Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Define sheet name then select sheet | Excel Discussion (Misc queries) | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
macro sheet select | Excel Discussion (Misc queries) | |||
Use Sheet CodeNames to Select Sheet in Different Workbook | Excel Discussion (Misc queries) | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions |