Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a sheet based on a cell
I have an worksheet used to input data which includes a drop down list with
subjects, lets say by way of example -types of animal. In other cells you can input information about the subject from the drop down list. Further sheets are named that reflect the names in the drop down list I want to be able to select a worksheet based on the subject from the drop down list using VBA. At the moment I can readily select one sheet such as: Worksheet("tiger").Activate How do I substitute "tiger" for whatever is chosen on the input worksheet cell drop down list???? Cheerz Wilcster |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a sheet based on a cell
Private Sub ListBox1_Click()
Worksheets(ListBox1.Value).Activate End Sub Mike F "wilcster" wrote in message ... I have an worksheet used to input data which includes a drop down list with subjects, lets say by way of example -types of animal. In other cells you can input information about the subject from the drop down list. Further sheets are named that reflect the names in the drop down list I want to be able to select a worksheet based on the subject from the drop down list using VBA. At the moment I can readily select one sheet such as: Worksheet("tiger").Activate How do I substitute "tiger" for whatever is chosen on the input worksheet cell drop down list???? Cheerz Wilcster |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a sheet based on a cell
Why not just keep an array of sheet names and look them up in there or
just a select case statement that converts the selection to a sheet name?? wilcster wrote: I have an worksheet used to input data which includes a drop down list with subjects, lets say by way of example -types of animal. In other cells you can input information about the subject from the drop down list. Further sheets are named that reflect the names in the drop down list I want to be able to select a worksheet based on the subject from the drop down list using VBA. At the moment I can readily select one sheet such as: Worksheet("tiger").Activate How do I substitute "tiger" for whatever is chosen on the input worksheet cell drop down list???? Cheerz Wilcster |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a sheet based on a cell
Mike
Thats great - Many thanks Wilco. "Mike Fogleman" wrote: Private Sub ListBox1_Click() Worksheets(ListBox1.Value).Activate End Sub Mike F "wilcster" wrote in message ... I have an worksheet used to input data which includes a drop down list with subjects, lets say by way of example -types of animal. In other cells you can input information about the subject from the drop down list. Further sheets are named that reflect the names in the drop down list I want to be able to select a worksheet based on the subject from the drop down list using VBA. At the moment I can readily select one sheet such as: Worksheet("tiger").Activate How do I substitute "tiger" for whatever is chosen on the input worksheet cell drop down list???? Cheerz Wilcster |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting a cell entry based on cell validation selection | Excel Worksheet Functions | |||
Selecting A Column based on Cell Value | Excel Discussion (Misc queries) | |||
Selecting rows based on cell entries | Excel Worksheet Functions | |||
Selecting rows based on cell entries | Excel Discussion (Misc queries) | |||
selecting and deleting a row based on a cell value | Excel Programming |