Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Is there a way to retrieve the name of the current worksheet in Excel VB?

I need a way to move the name of the currently selected worksheet into a character string. I need to do this so that I can switch back to the worksheet after switching to another one.

1 Answer

Relevance
  • 1 decade ago
    Favorite Answer

    You can use:

    ActiveSheet.Name

    This should work to place it in a string:

    strWSName = ActiveSheet.Name

    MsgBox strWSName

    will give a Message Box with the Active Sheet Name.

Still have questions? Get your answers by asking now.