Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual Basic 2008 Professionals For advanced Visual Basic coders working in version 2008. Beginning-level questions will be redirected to other forums,
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2008 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 27th, 2008, 11:39 AM
Dracitus
Guest
 
Posts: n/a
Default vb 2008 exsp

How Do You make a line Loop Like If Textbox1.text = "1" Then goto line 2: Line 2 If Textbox3 . text = 2 then goto lastline My question is in console application i want to be able to hit 1 then it gose to line1 hit 2 gose to Lastline bout i want the console to read visual basic 2008 express edtion textboxes

Imposiable is Always Posibles... No matter what it takes.
Reply With Quote
  #2 (permalink)  
Old August 27th, 2008, 02:15 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

To post code, click the [[u]#</u>] button. It inserts a pair of tags; put your code between those tgs and it will be fixed spacing, and will be presented literally as you type it.

That bold, red, weird-font is really hard to read...
Your best bet IMO is a Select Case structure:
Code:
    ' Get the input.  In this case it would be in the variable Answer
    ' Then use it in a Select Case statement:

    Select Case Answer
        Case 1
            ' Put the code here that would be at the GoTo Line 1
            ' area.  Alternately, write a routine like:
            RunCase1()
        Case 2
            ' Put the code here that would be at the GoTo Line 2
            ' area.  Alternately, write a routine like:
            RunCase2()
        Case 3
            ' Put the code here that would be at the GoTo Line 3
            ' area.  Alternately, write a routine like:
            RunCase3()
    End Select
    Jumping around with GoTo methods is considered very bad form. It makes programs really hard to read (when trying to figure out what they are supposed to be doing), really hard to maintain (if you need to modify how they work or if you have to repair an error, typo, whatever).

If you go to a job interview, and your portfolio has samples with
Code:
    If Answer = 1 Then
        GoTo 1
    ElseIf Answer = 2 Then
        GoTo 2
    ElseIf Answer = 3 Then
        GoTo 3
    End If
    You can be guaranteed to not get the job...

PS: It is “goes,” not “gose,” and “I” is capitalized when talking about yourself.

And, in reality, some things are actually impossible...
Reply With Quote
  #3 (permalink)  
Old September 27th, 2008, 10:56 AM
Registered User
 
Join Date: Sep 2008
Location: charlotte, nc, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As opposed to "Imposiable" and possible as opposed to "Posibles"? Strange, since the OP has "USA" as place where he/she lives. I really hope that residents of the US who are attempting to handle something like VB.NET, or ANY programming would have somewhat better of an education and a much better hold on spelling/grammar! If it's not education or not having English as a native language, it's got to be just plain laziness, I mean we have a spell checker at our disposal...
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Beginning VB 2008 mhccStudent Visual Basic 2008 Essentials 1 September 22nd, 2009 06:06 PM
Printing from VB 2008 BroadwayLion Visual Basic 2008 Essentials 1 September 27th, 2008 12:02 PM
why buy vs-2008 instead of vb-2008 jerryham VB.NET 7 September 2nd, 2008 02:39 PM
Downloading VB 2008 Express Kiddi Visual Basic 2008 Essentials 1 June 11th, 2008 12:29 PM
How do I write this vb 6 code to work in vb 2008? sanderson Visual Basic 2008 Essentials 3 June 10th, 2008 01:46 PM



All times are GMT -4. The time now is 01:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.