Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2011
    Location
    Iowa
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    How to get name of selected sheet for use in excel macro (vba code?)

    I need to get the name of the selected sheet in an excel workbook for use in vba code for further processing and reporting. For some reason I'm drawing a blank and being unsuccesful with searching for the needed command and/or property.

    Thanks for any suggestions.

    ScouterBob

  2. #2
    5 Star Lounger
    Join Date
    Jan 2004
    Location
    Praha
    Posts
    988
    Thanks
    56
    Thanked 105 Times in 90 Posts
    If by "selected sheet" you mean the active worksheet, then its name is returned by ActiveSheet.Name as in:

    Code:
    xyz = ActiveSheet.Name

  3. The Following User Says Thank You to MartinM For This Useful Post:

    ScouterBob (2012-10-11)

  4. #3
    New Lounger
    Join Date
    Feb 2011
    Location
    Iowa
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks MartinM, exactly what I needed.

Posting Permissions

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