Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 186
Default 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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Several Pivot Tables: Change one filter and adapt it for the other Aloha08 Excel Discussion (Misc queries) 2 June 12th 09 02:49 AM
Adapt code to loop through sheets Stuart[_21_] Excel Programming 3 October 7th 05 02:28 AM
Using Find/Replace in Visual basic to adapt the code Zakynthos Excel Programming 6 September 8th 05 03:41 PM
How can I adapt the included filter example to search for more th. Cheryl Excel Discussion (Misc queries) 0 February 24th 05 08:29 PM
Please help me to adapt this code. Rob Hargreaves Excel Programming 1 February 2nd 05 08:27 PM


All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"