View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
silverfox silverfox is offline
external usenet poster
 
Posts: 1
Default how do I program for a 'generic' worksheet to open

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