![]() |
Adapt code to show filter
I have the following code -
Private Sub Search_Clothing_Click() Worksheets("Sheet1").Range("DP:DP").AutoFilter _ field:=1, _ Criteria1:=clothing.Text 'This performs the filter on any text that is in the Clothing text field End Sub When i run the search it works fine, but the user cannot see the filtered cells withour scrolling left or right. Can i add a line which says go to DP so that the row appears in the top left of the screen? I am sure this is easy but i can't get my head round the syntax. Any help? |
Adapt code to show filter
Hi Jack,
Try: Application.Goto Reference:=Range("DP1"), Scroll:=True --- Regards, Norman "Jack" wrote in message ... I have the following code - Private Sub Search_Clothing_Click() Worksheets("Sheet1").Range("DP:DP").AutoFilter _ field:=1, _ Criteria1:=clothing.Text 'This performs the filter on any text that is in the Clothing text field End Sub When i run the search it works fine, but the user cannot see the filtered cells withour scrolling left or right. Can i add a line which says go to DP so that the row appears in the top left of the screen? I am sure this is easy but i can't get my head round the syntax. Any help? |
Adapt code to show filter
Works like a dream. Thanks!
"Norman Jones" wrote: Hi Jack, Try: Application.Goto Reference:=Range("DP1"), Scroll:=True --- Regards, Norman "Jack" wrote in message ... I have the following code - Private Sub Search_Clothing_Click() Worksheets("Sheet1").Range("DP:DP").AutoFilter _ field:=1, _ Criteria1:=clothing.Text 'This performs the filter on any text that is in the Clothing text field End Sub When i run the search it works fine, but the user cannot see the filtered cells withour scrolling left or right. Can i add a line which says go to DP so that the row appears in the top left of the screen? I am sure this is easy but i can't get my head round the syntax. Any help? |
All times are GMT +1. The time now is 07:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com