+ Reply to Thread
Results 1 to 8 of 8

VBA keywords

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    dallas
    MS-Off Ver
    Excel 2003
    Posts
    29

    VBA keywords

    Hi...I am working on a long vba code ...attempting to figure out corresponding "End If" for each If statement. Is there some sort of a key combination in vb ..so I could highlight the If statement and it jumps to corresponding End If.. Thank you.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA keywords

    No, we use indenting practices to make it visually clear which IF / END IF go together:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    09-07-2010
    Location
    dallas
    MS-Off Ver
    Excel 2003
    Posts
    29

    Re: VBA keywords

    Thank you.. but someone wrote the code without indenting and am trying to debug the code. It is very difficult to find out matching End If for some IF statements. I thought there is a hot key combination for this..

  4. #4
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: VBA keywords

    Quote Originally Posted by JBeaucaire View Post
    No, we use indenting practices to make it visually clear which IF / END IF go together:
    This VBA newbie(me) is filing this post away for future reference.
    Thanks JB
    Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
    John Wright

  5. #5
    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 keywords

    someone wrote the code without indenting
    Fix it: SmartIndenter
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: VBA keywords

    If I had to read somebody elses code I'd be using http://www.mztools.com/index.aspx

    Look at http://www.mztools.com/v3/download.aspx
    Last edited by MarvinP; 01-28-2011 at 08:06 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Valued Forum Contributor jwright650's Avatar
    Join Date
    12-10-2010
    Location
    Va, USA
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    606

    Re: VBA keywords

    shg, MarvinP,


    You guys are gonna fill up my hard drive...LOL


    Good stuff, gonna give all of these a try....

    <heading off to indent my previously written code with shg's indenter>

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA keywords

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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