View Full Version : How can I jump to a particular procedure or function in the Visual Basic Editor?
2011-05-03, 09:43 AM
Say I see this in the middle of a very busy VBA project:
Is there a shortcut that will let me jump to SomeProcedure to check it out?
Anyone got any other great VBE shortcut tips they'd like to share, while we're on the subject of productivity? I found some at http://datapigtechnologies.com/blog/index.php/vbe-tips-i-wish-i-knew-5-years-ago/ but I'm interested in MORE MORE MORE!!!!
2011-05-03, 10:46 AM
Select SomeProcedure then hit Shift-F2.
2011-05-03, 10:48 AM
And Ctrl-Shift-F2 takes you back.
2011-05-03, 10:49 AM
If you type in part of a variable/function name, hitting the spacebar will complete it for you, or give you intellisense.
2011-05-03, 10:51 AM
If you select a code module in the VBIDE and double-click, it brings up the code pane. If you do this with a userform, it brings up the form designer. To see the form code, you would normally select the form, right-click, and View Code, but you can select it and hit F7 to see the code.
2011-05-03, 10:55 AM
Awesome! Thanks Bob.
2011-05-03, 05:02 PM
Nice Bob! I knew the Intellisense, but obviously need to learn a few more keyboard shortcuts in the VBIDE.
2011-05-03, 05:08 PM
Jeffrey, not a shortcut, but in code I find Debug.Assert amazingly useful. It is back-to-front in my view, you use
Debug.Assert somevalue <> 17
to break when somevalue DOES equal 17, but very handy nonetheless.
2011-05-03, 05:23 PM
I am using for years now the VBE Tools http://www.oaltd.co.uk/VBETools/Default.htm and I find them very cool; especially the feature for renaming controls on a userform and also in the code module. There are also some more good tools with more features here http://www.mztools.com, but personally they are a little bit oversized for me.
Best regards :-)
2011-05-03, 05:43 PM
Something I recall telling at our UK Excel conference 2 years ago, and found even the other presenters did not know - you can drag-and-drop any object into the watch-window, much simpler than menus (I always use the Watch window, not the Locals window, it is more targetted).
2011-05-03, 09:57 PM
That's a cool trick. Thanks again.
2011-05-04, 10:21 PM
I use both windows, depending on the task, but they're always open. I use F7 a lot (& Shift + F7), along with F4, Ctrl + G and Ctrl + R (if either aren't open already). Some handy one's I like a lot, but generally don't get as much attention are Ctrl + I, Ctrl + Shift + I, mouse hover, Ctrl + mouse hover, and my newest favorite, Ctrl + F8. And if there are a lot of breakpoints, I use Ctrl + Shift + F9 to clear them easily.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.