how do I program for a 'generic' worksheet to open

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a program in excel visual basics. My progam has
numerous worksheets and I would like the user to input from an inputfunction
box the worksheet to access and then have the program open and display that
worksheet.

ie

Dim Message, MyValue
Message = "Enter a sheet name" ' Set prompt.
MyValue = InputBox(Message, Title, Default)
Worksheets(MyValue).Visible = True

I want the user's input to open a worksheet with that name.

any help would be most welcome. thanks
 
close --
use select not visible
...
Dim Message, MyValue
Message = "Enter a sheet name" ' Set prompt.
MyValue = InputBox(Message, Title, Default)
Worksheets(MyValue).Select
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top