Just wondering, why everytime I debug it will appear
Runtime Error 1004; Method 'Range' of object '_Global' failed
and it will be highlight at row
DataSH.Range("A2").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("Data!$L$8:$L$9"), CopyToRange:=Range("Data!$N$8:$T$8"), _
Unique:=False
If the coding is in forms what should the range be? And the range is referred to Master Data sheet. Can anyone help me?
Private Sub cmdContact_Click()
Dim DataSH As Worksheet
Set DataSH = Sheet1
DataSH.Range("L8") = Me.cboHeader.Value
DataSH.Range("L9") = Me.txtSearch.Text
DataSH.Range("A2").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("Data!$L$8:$L$9"), CopyToRange:=Range("Data!$N$8:$T$8"), _
Unique:=False
lstEmployee.RowSource = Sheet1.Range("outdata").Address(external:=True)
End Sub