Dear All,
I created a search box where in the data of a column gets filtered
used the following code which worked initially but once the data was formatted to a table it stopped working, could someone guide which part of the code needs changing?
the code is below-
![]()
Dim SH As Worksheet Set SH = ThisWorkbook.Sheets("CUSTOMER_DATABASE") Dim LR As Integer LR = Application.WorksheetFunction.CountA(SH.Range("A:A")) If LR = 1 Then LR = 2 Dim CUSTOMER_DISPLAY As Worksheet Set CUSTOMER_DISPLAY = ThisWorkbook.Sheets("CUSTOMER_DISPLAY") CUSTOMER_DISPLAY.Cells.Clear If Me.SEARCH_CD.Value <> "" Then SH.UsedRange.AutoFilter 2, "*" & Me.SEARCH_CD.Value & "*" End If SH.UsedRange.Copy CUSTOMER_DISPLAY.Range("A1") SH.AutoFilterMode = False
Bookmarks