Sub search()
cch = InputBox("search", "SEARCH")
For asdf = 1 To Sheets.Count
If Sheets(asdf).Name Like "*" & cch & "*" Then
Sheets(asdf).Select
GoTo line1
Else
End If
C:\Documents and Settings\All Users\Documents\1234.bmp
加入如下代码:
Private Sub TextBox1_Change() '直接输入工作表名查找
For asdf = 1 To Sheets.Count
If Sheets(asdf).Name Like "*" & TextBox1 & "*" Then
Sheets(asdf).Select
GoTo line1
Else
End If
Next
line1:
End Sub
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
Select Case KeyCode
Case 38 '按向上的光标键清除文本框的内容
TextBox1.Text = ""