Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I want user to select the worksheet
Hi,
I want user to select the sheet he needs for a data selection. I am able to se a form so they can chose the workbook, but I cannot figure out how to do it for a worksheet. I am afraid they can be name differently. Thanks! -- Mathieu |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
I want user to select the worksheet
Hi Mathieu
With a listbox and a commandbutton on a form I thikn this can help you: Private Sub CommandButton1_Click() SelectedWsh = Me.ListBox1.ListIndex MsgString = Sheets(SelectedWsh + 1).Name & " was selected" Msg = MsgBox(MsgString) End Sub Private Sub UserForm_Initialize() Dim wb As Workbook Set wb = ActiveWorkbook For Each sh In wb.Sheets Me.ListBox1.AddItem sh.Name Next End Sub Regards, Per On 24 Okt., 20:15, Mathieu wrote: Hi, I want user to select the sheet he needs for a data selection. I am able to se a form so they can chose the workbook, but I cannot figure out how to do it for a worksheet. I am afraid they can be name differently. Thanks! -- Mathieu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Programmatically allowing user to select worksheet | Excel Programming | |||
Prompt user to select a printer using a checkbox within a user | Excel Programming | |||
User select row? | Excel Programming | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) | |||
In Excel 2000, How do you select the whole of a worksheet (Select. | Excel Discussion (Misc queries) |