Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA Sheet(variable).range... possible ?
Hi Everyone,
is it possible to add a variable to the sheet(var).range("A1").select expression? I know of the sheets("name") expression, but this is a workbook that contains multiple sheets, no naming convention, and requires me to go back, forth and skip some sheets depending on user input. Example: Var = 10 sheet(Var).range("A1").select would give: sheet10.range("A1").select |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA Sheet(variable).range... possible ?
Sub tst()
Var = 3 Sheets("Sheet" & Var).Activate Range("A1").Select End Sub "Phil" skrev: Hi Everyone, is it possible to add a variable to the sheet(var).range("A1").select expression? I know of the sheets("name") expression, but this is a workbook that contains multiple sheets, no naming convention, and requires me to go back, forth and skip some sheets depending on user input. Example: Var = 10 sheet(Var).range("A1").select would give: sheet10.range("A1").select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set up a variable reference range in Excel? | Excel Programming | |||
Can I use a variable to call up another sheet in Excel? | Excel Worksheet Functions | |||
Can I use a variable to call up another sheet in Excel? | Excel Worksheet Functions | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Problem trying to us a range variable as an array variable | Excel Programming |