Ich habe auf einer UserForm eine Combobox.
Wenn ich darauf klicke sollen darin alle vorhandenen Exceltabellen angezeigt werden.
Drücke ich auf eine angezeigte Tabelle, so soll die Tabelle geöffnet werden.
Wer kann mir hier dabei helfen?
VG
Thomas
Private Sub UserForm_Initialize()
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
ComboBox4.AddItem wks.Name
Next
ComboBox4.ListIndex = 0
Private Sub ComboBox4_Change()
ThisWorkbook.Worksheets(ComboBox4.Value).Activate
End Sub
Private Sub ComboBox4_Change()
Dim WS as Worksheet
On Error Resume Next
Set WS= ThisWorkbook.Worksheets(ComboBox4.Value)
On Error Goto 0
If Not WS Is Nothing Then WS.Activate
End Sub
Gruß Gerd