Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 504
Default Macro to go to select sheet

Hi, I have a drop down list on sheet 1 that, when anything is chosen, sheet 3
gets renamed to the same name as what I picked from the drop down. I would
like to have a command button on sheet 1 that runs a macro to go to sheet3,
but sheet3 is now renamed, so I'm not sure how to let the macro know how to
find the new name of sheet3 so it can go to it. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,480
Default Macro to go to select sheet

Hi Kevin

Substitute the name of the sheet with your dropdown, and the cell location
of the dropdown in the following code

Dim shname As String

shname = Sheets("Sheet1").Range("D1").Value

Sheets(shname).Select

--

Regards
Roger Govier

"Kevin" wrote in message
...
Hi, I have a drop down list on sheet 1 that, when anything is chosen,
sheet 3
gets renamed to the same name as what I picked from the drop down. I would
like to have a command button on sheet 1 that runs a macro to go to
sheet3,
but sheet3 is now renamed, so I'm not sure how to let the macro know how
to
find the new name of sheet3 so it can go to it. Any ideas?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 504
Default Macro to go to select sheet

Hi, Roger, thanks for the reply - it works perfect. I also found another way
to do it shortly before your post. I named a cell on the target sheet and
used to application.goto (sheet2) command in the macro. Your seems easier to
use, though :) - thanks again for the help, -Kevin

"Roger Govier" wrote:

Hi Kevin

Substitute the name of the sheet with your dropdown, and the cell location
of the dropdown in the following code

Dim shname As String

shname = Sheets("Sheet1").Range("D1").Value

Sheets(shname).Select

--

Regards
Roger Govier

"Kevin" wrote in message
...
Hi, I have a drop down list on sheet 1 that, when anything is chosen,
sheet 3
gets renamed to the same name as what I picked from the drop down. I would
like to have a command button on sheet 1 that runs a macro to go to
sheet3,
but sheet3 is now renamed, so I'm not sure how to let the macro know how
to
find the new name of sheet3 so it can go to it. Any ideas?


Reply
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
Define sheet name then select sheet merry_fay Excel Discussion (Misc queries) 3 December 13th 07 01:23 PM
How do I select price from sheet.b where sheet.a part no = sheet.b Sonny Excel Worksheet Functions 4 April 4th 06 05:08 PM
macro sheet select Dave K Excel Discussion (Misc queries) 2 October 21st 05 10:08 PM
Use Sheet CodeNames to Select Sheet in Different Workbook Randy Excel Discussion (Misc queries) 1 June 10th 05 12:17 AM
Macro, select Sheet "Number", NOT Sheet Name DAA Excel Worksheet Functions 4 November 30th 04 05:29 PM


All times are GMT +1. The time now is 11:38 PM.

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"