Sorry Gord,
Here goes!!
I have the following:
UserForm8, commandbutton2 brings up UserForm3
UserForm3 has a TextBox1 which the search subject is inserted and
commandbutton1 to search.
Sheet1 (“detailsâ€) has all the data in.
UserForm3:
TextBox1 properties: I have inserted in controlsource =details!f5001
CommandButton1 has the following code:
Option Explicit
Private Sub CommandButton1_Click()
Worksheets("details").Select
Cells.Range("A1").Select
UserForm3.Hide
UserForm8.Hide
End Sub
Sheet1(“detailsâ€) has the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$5001" Then
Application.EnableEvents = False
If Target.Value = "" Then
ShowAllRecords
Else
Range("A3").CurrentRegion.AdvancedFilter _
Action:=xlFilterInPlace, CriteriaRange:= _
Range("G5002:G5003"), Unique:=False
End If
Application.EnableEvents = True
End If
End Sub
I have a modFilter with code;
Option Explicit
Sub ShowAllRecords()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub
Its when I press commandbutton1, userform3 I get the error “Exception
occurredâ€