Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sheet select
I have sheet named "Tom", "Bill", and "Joe".
I have a useform with a combobox that has the options "Tom, Bill and Joe". I want a code that will select the appropriate sheet depending on the cmbx selection. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sheet select
I assume that you have the combo box in a cell. Here is some code that will
do what you need. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then On Error Resume Next Sheets(Target.Value).Select End If End Sub It assumes that you combo box is in Cell A1. You can change that by changing: Target.Address = "$A$1" To add this code. Right Click on the worksheet tab that contains the combo box. the last itme on the list is view code. Select View code and then just paste this code in and you are off and running... HTH "scrabtree23" wrote: I have sheet named "Tom", "Bill", and "Joe". I have a useform with a combobox that has the options "Tom, Bill and Joe". I want a code that will select the appropriate sheet depending on the cmbx selection. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Alternate Row Select in Sheet 1 then Paste to Sheet 2 | Excel Worksheet Functions | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
Use Sheet CodeNames to Select Sheet in Different Workbook | Excel Discussion (Misc queries) | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions | |||
Select Sheet then Select Range | Excel Programming |