redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,602
- Office Version
- 365
- Platform
- Windows
Hi all
Can somebody help with this VBA below
All I need is if the value added into the Textbox1 isn't found through the filtered data then display userform4
my code as follows...
Can somebody help with this VBA below
All I need is if the value added into the Textbox1 isn't found through the filtered data then display userform4
my code as follows...
VBA Code:
Private Sub CommandButton1_Click()
Sheets("Inventory").Select
With ThisWorkbook.Worksheets("Inventory")
.AutoFilterMode = False
With Range("B4:H1000")
.AutoFilter
If Len(Me.TextBox1.Value) > 0 Then
.AutoFilter Field:=1, Criteria1:=Me.TextBox1.Value
End If
End With
UserForm2.TextBox1.Value = ""
UserForm2.Hide
End With
End Sub