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.
No, we use indenting practices to make it visually clear which IF / END IF go together:
If Test = True Then 'some code 'some code If TestTwo = True Then 'some code If A = B Then 'do this Else 'do this End If Else 'some code If B = C Then 'do this Else 'do this End If End If End If
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon 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!)
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..
Fix it: SmartIndentersomeone wrote the code without indenting
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
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 07:06 PM.
One test is worth a thousand opinions.
Click the * below to say thanks.
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>
Life is like a roll of toilet paper. The closer it gets to the end, the faster it goes.
John Wright
If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon 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!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks