Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet with a ComboBox
I have a ComboBox that is populated by all of the
worksheets contained in a workbook. I would like to select a worksheet by using the ComboBox. I haven't been able to get anything to work. I would imagine you would assign the combobox value to a variable and select the worksheet using the variable name or is there a better way? Thanks, Todd |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet with a ComboBox
Why not just use
Worksheets(Combobox1.Value).Activate in the code linked to the combobox click event? -- HTH ------- Bob Phillips "Todd" wrote in message ... I have a ComboBox that is populated by all of the worksheets contained in a workbook. I would like to select a worksheet by using the ComboBox. I haven't been able to get anything to work. I would imagine you would assign the combobox value to a variable and select the worksheet using the variable name or is there a better way? Thanks, Todd |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet with a ComboBox
You should make a list of all of the worksheet names and then define th
list as a named list (Insert Name Define). Now in the Rowsource property of the combobox insert sheet!name where sheet is the worksheet containing your named list and name is th defined name of the list. When you run the combobox now then you will have the worksheets t select from. Finally place the following code Code ------------------- Private Sub ComboBox1_Change() Worksheets(ComboBox1.Text).Activate End Sub ------------------- changing combobox1 to match the name of your combobox. HTH Gordo -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a worksheet with a ComboBox
That's what it was...I had it linked to a Change event.
Thanks a lot Bob -----Original Message----- Why not just use Worksheets(Combobox1.Value).Activate in the code linked to the combobox click event? -- HTH ------- Bob Phillips "Todd" wrote in message ... I have a ComboBox that is populated by all of the worksheets contained in a workbook. I would like to select a worksheet by using the ComboBox. I haven't been able to get anything to work. I would imagine you would assign the combobox value to a variable and select the worksheet using the variable name or is there a better way? Thanks, Todd . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Need to update a ComboBox when selecting a sheet | Excel Worksheet Functions | |||
Selecting any cell in a column I want my ComboBox to show. How? | Excel Discussion (Misc queries) | |||
Copying Worksheet triggers Click event of combobox on another worksheet | Excel Programming | |||
Combobox: Selecting values from a row and place in combi box plus update | Excel Programming | |||
Selecting/Activating Control Tools Combobox on Sheet | Excel Programming |