+ Reply to Thread
Results 1 to 6 of 6

VBA Syntax Help

  1. #1
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    VBA Syntax Help

    Please Login or Register  to view this content.
    the Code here is used in this forums VBA tips tutorials, If i copy and paste it, it works no problem and the words Do and Loop Until show up in Blue.

    If i try typing the code, the word Do shows up in Blue as it does in the sample, but the Loop Until doesn't and the code fails. Is there a way to put the ending part of the syntax in via a selection drop down? I don't see it as an option and typing it's not working

    Total novice at VBA
    Windows 7 using Office 2007 & 2010

    Remember your [ code ] [ /code ] tags, makes reading soooo much easier

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA Syntax Help

    Paste the code as it is when the Loop statement doesn't highlight, Scotty.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: VBA Syntax Help

    Do you mind pasting your hand-typed code? There has to be some mis-type that is preventing it from running.

  4. #4
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: VBA Syntax Help

    Thanks for looking guys, but the code now appears to be working. Not sure but maybe I've put an errant space somewhere

  5. #5
    Valued Forum Contributor scottylad2's Avatar
    Join Date
    09-03-2010
    Location
    edinburgh
    MS-Off Ver
    Office 2007 Prof & Office 2010 Student Edition
    Posts
    629

    Re: VBA Syntax Help

    Hi again, as a suplementary to my initial query, is there a way to inseet the Do and Loop Until without typing it? Ie is there dropdowns I've yet to discover that when i start a loop and insert the word Do....is there an automatic Excel generated step through to get to the Loop Until?

    Really want to get my head round VBA but have started growing my nails in prep for the head scratching

    As always, much obliged

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA Syntax Help

    Typing is the way, Scotty. The VBE won't generate code structures like it will procedure signatures.
    Last edited by shg; 06-01-2011 at 01:07 PM.

+ 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