+ Reply to Thread
Results 1 to 6 of 6

GoTo code

  1. #1
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    GoTo code

    Hello,

    How do I use the GoTo so that I can Specify A line of Code to go to...

    for example

    Please Login or Register  to view this content.
    Is this posible??
    Last edited by RBI; 10-30-2008 at 09:09 AM. Reason: mark as solved

  2. #2
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Use the same code posted above, but then, where your reference is, you need to include the description. Example:

    Please Login or Register  to view this content.
    You can also do the same by using On Error GoTo imessedup

    HTH

    Jason

  3. #3
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47
    Ya but does this work If the GoTO refers to a line that is before it

    ex

    Please Login or Register  to view this content.
    You see the macro is just to open a file, search for a value then exit if it finds it, if not it closes and goes to the next but it's not working yet... The first Goto is to go back to the start if the filename can not be found t ofind the next file on the list, The secod Goto is to close the current file and go back to the list if the value being searchd for cannot be found... another problem is that i don't know if, when the "find" function doens't find anything is that an error?? cause if it's not then the second Goto won't work....


    Any Help on these issues is apprecieated
    Last edited by RBI; 10-24-2008 at 03:46 PM.

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    I wasn't able to test it due to the amount of work that would be involved in replicating your situation, but try this code to see if it works:

    Please Login or Register  to view this content.
    Jason
    Last edited by jasoncw; 10-24-2008 at 07:31 PM.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    In the code in post #3
    change one line
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Registered User
    Join Date
    09-13-2008
    Location
    Barrie, ON, CA
    Posts
    47

    Calling Macros

    Sorry Wrong Spot
    Last edited by RBI; 10-27-2008 at 10:12 AM. Reason: Wrong Post

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1