Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Define sheet name then select sheet
Hiya,
I've typed the name of the sheet I want to go to in a cell in excel & used the macro to define it, but then I can't seem to get the code right for using that definition to activate the sheet. sheet_name = ActiveCell.Value Sheet sheet_name.Select (I've tried lots of different ways of writing this...) Can anyone help? Thanks merry_fay |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Define sheet name then select sheet
Try
ThisWorkbook.Sheets(sheet_name).Select -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "merry_fay" wrote in message ... Hiya, I've typed the name of the sheet I want to go to in a cell in excel & used the macro to define it, but then I can't seem to get the code right for using that definition to activate the sheet. sheet_name = ActiveCell.Value Sheet sheet_name.Select (I've tried lots of different ways of writing this...) Can anyone help? Thanks merry_fay |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Define sheet name then select sheet
Hi,
Just try : Dim sheet_name As String sheet_name = ActiveCell.Value Sheets(sheet_name).Select HTH |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Define sheet name then select sheet
Sub selectsheetfromcellvalue()
Sheets(ActiveCell.Value).Select End Sub -- Don Guillett Microsoft MVP Excel SalesAid Software "merry_fay" wrote in message ... Hiya, I've typed the name of the sheet I want to go to in a cell in excel & used the macro to define it, but then I can't seem to get the code right for using that definition to activate the sheet. sheet_name = ActiveCell.Value Sheet sheet_name.Select (I've tried lots of different ways of writing this...) Can anyone help? Thanks merry_fay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using cells to define sheet references | Excel Discussion (Misc queries) | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
open at define work sheet | 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 |