Private Sub CommandButton2_Click()
Dim str5 As String
Dim x As Long
For x = 2 To 10
If Sheet3.Cells(x, 2).Value = "" Then Exit Sub
str5 = Sheet3.Cells(x, 10).Value
If str5 = "AIRC" Then Sheet1.Visible =1 '顯示工作表
Next
End Sub
If str5 = "AIRC" Then Sheet1.Visible =1 '顯示工作表 你是試一下這樣改。
或者改成 善良的豬頭3
If str5 = "AIRC" Then Sheet1.Visible =true '顯示工作表
這樣的代碼,試試。