+ Reply to Thread
Results 1 to 4 of 4

Skipping Code (for testing)

  1. #1
    Registered User
    Join Date
    10-23-2006
    Posts
    79

    Skipping Code (for testing)

    Hi

    Is there a way to 'skip' a chunk of code so that you can test a small part to see if it does what you want (instead of running or stepping through the whole macro)...?

    In another language I use, we can 'skip' chunks using a special command - sort of like/similar to a 'goto' command.

    Is there a way to do this with VBA Macros and if so - can I have a CODE example..?

    Thanks again, dugong

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    You can comma it out

    e.g
    Please Login or Register  to view this content.
    this line won't run.

    or in VB Debug > Step over

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Or use compiler directives:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-23-2006
    Posts
    79

    Thanks

    Thanks VBA Noob - but it would require me having to " ' " out loads of lines.
    Quote Originally Posted by shg
    Or use compiler directives:
    Please Login or Register  to view this content.
    Thanks shg - this is more what I was after...
    Thanks both of you

+ 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