warum funktioniert folgender Code nicht?
Private Sub CommandButton1_Click()
'suchen nach Tab.blatt
Application.ScreenUpdating = False
On Error Resume Next
Dim wks As Worksheet
Dim strWKS As String
strWKS = TextBox1.Value
For Each wks In Worksheets
If strWKS = "" Then Exit Sub
If InStr(UCase(wks.Name), UCase(strWKS)) > 0 Then
'wks.Visible = True
wks.Select
Exit Sub
End If
Next wks
Application.ScreenUpdating = True
End Sub
Ich möchte ein Tabellenblatt über eine Textbox suchen.
Wer kann helfen.
Gruß Sandra