+ Reply to Thread
Results 1 to 4 of 4

VBA to Prompt for Sheet Name Without Typing

  1. #1
    Forum Contributor
    Join Date
    01-28-2008
    MS-Off Ver
    Excel 365
    Posts
    160

    VBA to Prompt for Sheet Name Without Typing

    Is there an easy way in VBA to prompt the user to activate the SHEET to be processed, rather than prompting the user to TYPE the name of the sheet?

    This code will prompt for the workbook and the range, allowing the user to use the mouse without typing. However, I don't know how to prompt for the SHEET.

    Please Login or Register  to view this content.
    Thank you!

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: VBA to Prompt for Sheet Name Without Typing

    Doesn't the user select the sheet as well as the range using the Input box?

    If so then the MyRange reference can tell you.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    01-28-2008
    MS-Off Ver
    Excel 365
    Posts
    160

    Re: VBA to Prompt for Sheet Name Without Typing

    You are right. The address property of the selected range includes the sheet name, such as '[Wrokbook Name]SheetName'!Range Name

    I can search for the ] adn the ' to find the sheet name.

    Thanks!

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,482

    Re: VBA to Prompt for Sheet Name Without Typing

    No need to search as the book names is also accessible via the object

    Please Login or Register  to view this content.

+ 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