Input Message
Hi Excel Help,
If Not Res1 = vbNullString _
And Res2 = vbNullString Then
Should have read:
If Not Res1 = vbNullString _
And Not Res2 = vbNullString Then
However, try the follwing version:
Res1 = Application.InputBox( _
Prompt:="Enter first criterion", _
Type:=3, _
Title:="Criterion 1")
Res2 = Application.InputBox( _
Prompt:="Enter second criterion", _
Type:=3, _
Title:="Criterion 3")
If Not Res1 = vbNullString _
And Not Res2 = vbNullString Then
rng.AutoFilter Field:=1, _
Criteria1:=Res1, _
Operator:=xlOr, _
Criteria2:=Res2
Else
WS.ShowAllData
End If
---
Regards.
Norman
|