locked
How do I switch to a worksheet? RRS feed

  • Question

  • Greetings,

    How do I switch from the Visual Basic Editor to a worksheet during runtime?

    If the procedure were not running, I could click the View Microsoft Excel button (Alt+F11). Is there a VBA statement that does the same thing?

    Thanks,
    Shane.

    Excel 2010 SP2 (14.0.7173.5000) 64-bit


    Windows 7 Home Premium SP1 64-bit

    Saturday, December 3, 2016 8:04 AM

All replies

  • Hi,

    May I know what is the need of it?

    When you are running the VBA code you don't need to be there on the VBA code screen. That you can run it from being on the worksheet screen.


    Vish Mishra

    Saturday, December 3, 2016 12:32 PM
  • So when I click the Run Sub/UserForm (F5) it will take me to the worksheet.

    Thanks,
    Shane.


    Windows 7 Home Premium SP1 64-bit

    Sunday, December 4, 2016 2:24 AM
  • So when I click the Run Sub/UserForm (F5) it will take me to the worksheet.

    It is clear what the code should do, but what is the sense behind?

    Andreas.

    Monday, December 5, 2016 11:05 AM
  • To speed up the development/debugging process. I know of work-arounds, but I figured there must be a way of giving focus to a worksheet.

    Thanks,
    Shane.


    Windows 7 Home Premium SP1 64-bit

    Tuesday, December 6, 2016 2:28 AM