Page 2 of 2 FirstFirst 12
Results 41 to 64 of 64

Thread: Help with GoTo statements and looping

  1. #41

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    If I removed them, what would I use to indicate the stopping point for the loop?

  2. #42
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Well then you have to work from the original type of project that you had, previously posted. Cause now I ruined it, because I had saved over it by mistake. So sorry...
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  3. #43

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    It was a rhetorical response...

    I need something in the code that indicates a stopping point. Otherwise, it's useless.

  4. #44
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Code:
    DoEvents
    I guess, try it in the something like an event that doesn't have a Timer in it???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  5. #45

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Could you go into further detail on DoEvents? I'm pretty new to VB.

    Thank you.

  6. #46
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Well it's very hard to describe what to use it for, seeing that it can be used for many types of purposes. Like animation and also network support, like a login script, etc...
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  7. #47
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Help with GoTo statements and looping

    don't fib and don't sugar coat it.... DoEvents is for one purpose and one purpose only... when you use DoEvents, you're telling the system "Hey, I'm not doing anything important at the moment, if you have any waiting message in the message queue, process them." That's what it does... It comes with a price... and more often not, a lot of unintended consequences. There is a reason why this thread made it up to two pages before the suggestions came up.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #48
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    And that is, sorry I have only been working by myself today. Everyone's out of the Office...
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  9. #49

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Quote Originally Posted by techgnome View Post
    don't fib and don't sugar coat it.... DoEvents is for one purpose and one purpose only... when you use DoEvents, you're telling the system "Hey, I'm not doing anything important at the moment, if you have any waiting message in the message queue, process them." That's what it does... It comes with a price... and more often not, a lot of unintended consequences. There is a reason why this thread made it up to two pages before the suggestions came up.

    -tg
    Part of the reason is I'm also very new to this. Am I correct to say things aren't looking good as far as a solution to my problem?

  10. #50
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Help with GoTo statements and looping

    my reply wasn't aimed at you... in was in direct response to theimp's suggestion of using doEvents... it's a slippery slope to start on... sometimes it becomes necessary, in which case, it can be used as long as you have a full and complete understanding of what it could do - specifically, releases the system to take action on other messages in the queue, which could include processing OTHER EVENTS in your app, that could cause you to end up someplace you're not prepared to be at yet.
    That's all.

    As for you issue specifically, I don't know. To be honest, I'm having trouble following the thread... so I'm leaving it in the (hopefully) capable hands of others who seem to have a better idea of what you're doing than I.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #51
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Well I guess that we could be able to get a Super Moderator to help us, but then that's the OP's decision, then not min to do???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  12. #52

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    I would like to try another route. Is there a way I could make the script stop when it reaches row 11 on the page?

  13. #53
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    But then that would be altering a long of source code. Also what are you going to skip from the line xyz to line 11???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  14. #54

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Quote Originally Posted by ThEiMp View Post
    But then that would be altering a long of source code. Also what are you going to skip from the line xyz to line 11???
    What source code? Can I not tell the script to check what line/row is it on, and if it's on line 11, have it stop? Instead of going through the .StatusBar hassle.

  15. #55
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Well then can't you use a GoTo I believe that you can use that in this type of instance or even a GoSub, either way???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  16. #56

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Quote Originally Posted by ThEiMp View Post
    Well then can't you use a GoTo I believe that you can use that in this type of instance or even a GoSub, either way???
    I don't mind using If Then. I just need the script to stop. Is there a command that will look at line 11 so I can create a stopping point??

  17. #57
    PowerPoster
    Join Date
    Jul 2006
    Location
    Maldon, Essex. UK
    Posts
    6,334

    Re: Help with GoTo statements and looping

    Quote Originally Posted by mitch27 View Post
    If I removed them, what would I use to indicate the stopping point for the loop?
    My suggestion was something like this
    Code:
    Sub TestGoTo()
    
        On Error GoTo ErrorHandler
    
        Const NEVER_TIME_OUT = 0
    
        Dim ESC As String   ' Chr(rcESC) = Chr(27) = Control-[
    
        ESC = Chr(Reflection2.ControlCodes.rcESC)
    
        With Session
    
    StartLoop:
        .TransmitTerminalKey rcVtUpKey
        If .StatusBar <> "" Then
            GoTo ExitLoop
        Else
            .TransmitTerminalKey rcVtSelectKey
            .TransmitTerminalKey rcVtRemoveKey
            .Transmit CR
            '.StatusBar = ""
            .Transmit "Y"
            '.StatusBar = ""
            .Transmit CR
        End If
        GoTo StartLoop
    
    ExitLoop:
        Debug.Print .StatusBar    ' display the contents of StatusBar in the Immediate Window
        .Transmit CR
        .Transmit CR
        Exit Sub
    ErrorHandler:
        Session.MsgBox Err.Description, vbExclamation + vbOKOnly
        
        End With
        
    End Sub

  18. #58
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    I guess that you could be able to make it loop over on Line 11, but then what is so special about line 11???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  19. #59

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Quote Originally Posted by Doogle View Post
    My suggestion was something like this
    Thank you for the response, I will try this in the morning and report back.

  20. #60
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    So sorry, I keep making that kind of mistake!!
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  21. #61

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Update:

    I tried the script Doogle provided, it seems to ignore the commands that include .StatusBar and continue looping.

  22. #62
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Retro fit your source code that you had in the first place and then add in the looping source code to it. Then it will do both and then see what happens then???
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

  23. #63

    Thread Starter
    Junior Member
    Join Date
    Jun 2013
    Posts
    22

    Re: Help with GoTo statements and looping

    Quote Originally Posted by ThEiMp View Post
    Retro fit your source code that you had in the first place and then add in the looping source code to it. Then it will do both and then see what happens then???
    Can you explain in further detail what you're asking?

  24. #64
    PowerPoster ThEiMp's Avatar
    Join Date
    Dec 2007
    Location
    Take The PCI Bus Across To The CPU!!
    Posts
    3,948

    Re: Help with GoTo statements and looping

    Use the source code that you have about the looping and then add it to the source code that you had before hand that worked without it. Then you should be able to have a working demo product of your program. That worked for me on some occassions, but then I stongly suggest to backup both of the projects, at that...
    I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...

    |Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |

    Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width