LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 230
Default Selecting sheet with VB

Mike,

Now says Subscript out of range.

Rob

"Mike H" wrote in message
...
Try,

Dim ss As String
ss = Sheets("Sheet60").Range("d2").Value
Sheets(ss).Select

Mike

"RobN" wrote:

(I posted this in the office.misc newsgroup by mistake)

I've used the following to try and have VB select a sheet dependant on
the
value in d2.
Dim ss As Variant
Set ss = Sheet60.Range("d2")

How do I apply that now to select that sheet? I thought something like
sheet(ss).select would do it, but it doesn't work

Sheets(ss).select does work, but doesn't go to the correct sheet number,
whereas Sheet(ss) brings up a "Sub or Function not defined" error.

Rob





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to update a ComboBox when selecting a sheet [email protected] Excel Worksheet Functions 1 October 31st 07 02:23 PM
Display MsgBox when selecting a sheet Horatio J. Bilge, Jr. Excel Discussion (Misc queries) 3 October 11th 07 03:42 PM
Selecting active area of sheet cfspahn24 Excel Discussion (Misc queries) 4 April 17th 06 12:19 PM
Selecting Last Sheet Bonbon Excel Worksheet Functions 17 February 22nd 06 04:16 PM
Selecting a sheet from a drop down box Caveman Excel Discussion (Misc queries) 6 February 18th 06 11:09 PM


All times are GMT +1. The time now is 06:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"