+ Reply to Thread
Results 1 to 7 of 7

Step Through Function (F8 command) and Checking Variables -- Not working?

  1. #1
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Step Through Function (F8 command) and Checking Variables -- Not working?

    Hello, so I'm working on a fairly complex (for me) bit of code and it would help me to be able to step through the code one line at a time and watch it work to make sure nothing unexpected happens.

    Previously I was told about using F8 to walk through the code like this but I can't seem to get it to work. I should note that I'm on a 2012 Macbook Pro. My F8 key is actually a play/pause button for media, but it is a regular F8 key if I hold down the "fn" button on my keyboard. I'm not sure if this works differently on macs than on windows? Also, I'm using Excel 2011.

    In addition, my code uses variables frequently and I was wondering if it was possible to bring up some kind of screen that displays the values the computer has for the variables so I can make sure it's handling of the variables is fine.


    Thank you very much.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    Try CMD+SHIFT+I

    (Or in the menu, debug -> step into, might tell you what the shortcut is next to it I guess).

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    you need the Locals window. f8 is not the same on the mac-I think it's cmd+shift+I but you can check the keys on the 'Debug-step into' menu command
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    cmd + shift + I worked perfectly, thanks!

    Any idea on keeping track of variable values?

  5. #5
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    Add a watch for the variable (Debug->Add watch menu command) and type the variable name you want to keep track of. Alternatively highlight variable and "right click" and you should have an add watch option.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    and the Locals window ;-)

  7. #7
    Registered User
    Join Date
    06-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2011
    Posts
    64

    Re: Step Through Function (F8 command) and Checking Variables -- Not working?

    Quote Originally Posted by JosephP View Post
    and the Locals window ;-)
    Oh! Sorry, missed that before.
    Thanks though!

+ 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