Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: How can I jump to a particular procedure or function in the Visual Basic Editor?

  1. #1
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    356
    Articles
    0

    How can I jump to a particular procedure or function in the Visual Basic Editor?



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Say I see this in the middle of a very busy VBA project:
    SomeProcedure "Variable1"

    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/...w-5-years-ago/ but I'm interested in MORE MORE MORE!!!!

  2. #2
    Select SomeProcedure then hit Shift-F2.

  3. #3
    And Ctrl-Shift-F2 takes you back.

  4. #4
    If you type in part of a variable/function name, hitting the spacebar will complete it for you, or give you intellisense.

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

  6. #6
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    356
    Articles
    0
    Awesome! Thanks Bob.

  7. #7
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,021
    Articles
    79
    Blog Entries
    14
    Nice Bob! I knew the Intellisense, but obviously need to learn a few more keyboard shortcuts in the VBIDE.
    Ken Puls, FCPA, FCMA, MS MVP (Excel)

    Master your data with Power Query: Purchase your copy of my book M is for Data Monkey today!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  8. #8
    Jeffrey, not a shortcut, but in code I find Debug.Assert amazingly useful. It is back-to-front in my view, you use

    Code:
    Debug.Assert somevalue <> 17
    to break when somevalue DOES equal 17, but very handy nonetheless.

  9. #9
    Hi all...

    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 :-)

  10. #10
    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).

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •