Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Forms combo box selection
Hi
I have a form which displays all sheets in the workbook. I want the user to be able to select the sheet(s) and click the button to open them. This is my code so far. Private Sub UserForm_Initialize() Dim ws As Worksheet For Each ws In Worksheets With Me.LBView .AddItem ws.Name .List(.ListCount - 1, 1) = .RowSource End With Next ws End Sub Excel 2000 Thanks Ruth |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Forms combo box selection
If you add a button to your userform something like following should work.
Private Sub CommandButton1_Click() Worksheets(Me.LBView.Text).Activate End Sub -- jb "SundayGirl" wrote: Hi I have a form which displays all sheets in the workbook. I want the user to be able to select the sheet(s) and click the button to open them. This is my code so far. Private Sub UserForm_Initialize() Dim ws As Worksheet For Each ws In Worksheets With Me.LBView .AddItem ws.Name .List(.ListCount - 1, 1) = .RowSource End With Next ws End Sub Excel 2000 Thanks Ruth |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Archiving user selection from Drop Down (forms - combo box) | Excel Discussion (Misc queries) | |||
Forms Combo Box | Excel Worksheet Functions | |||
Combo Box selection only shows bound column info after selection made. | Excel Programming | |||
Populate one combo box based on the selection of another combo box | Excel Programming | |||
Combo Box vba that works like Forms Menu combo box | Excel Programming |