Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Scroll home after Autofilter select

I am using the following function to highlight the column header of an
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesnt scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions wont allow this. Is there another way of getting around this?

Thanks,
Steve

Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Scroll home after Autofilter select

How are you using this function? Are you accessing it through code or are you
using it as a UDF? If you are using it as a UDF then it can not modify or
change the formatting of your sheet. It can only return a value...
--
HTH...

Jim Thomlinson


"Steve" wrote:

I am using the following function to highlight the column header of an
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesnt scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions wont allow this. Is there another way of getting around this?

Thanks,
Steve

Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Scroll home after Autofilter select

Jim,

I am using it as a UDF. I suspected that I would not be able to put
anything in the function code, but was hoping for a workaround.

"Jim Thomlinson" wrote:

How are you using this function? Are you accessing it through code or are you
using it as a UDF? If you are using it as a UDF then it can not modify or
change the formatting of your sheet. It can only return a value...
--
HTH...

Jim Thomlinson


"Steve" wrote:

I am using the following function to highlight the column header of an
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesnt scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions wont allow this. Is there another way of getting around this?

Thanks,
Steve

Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Scroll home after Autofilter select

Nope... UDF's return values. Period. They do not change formatting or any
other settings.
--
HTH...

Jim Thomlinson


"Steve" wrote:

Jim,

I am using it as a UDF. I suspected that I would not be able to put
anything in the function code, but was hoping for a workaround.

"Jim Thomlinson" wrote:

How are you using this function? Are you accessing it through code or are you
using it as a UDF? If you are using it as a UDF then it can not modify or
change the formatting of your sheet. It can only return a value...
--
HTH...

Jim Thomlinson


"Steve" wrote:

I am using the following function to highlight the column header of an
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesnt scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions wont allow this. Is there another way of getting around this?

Thanks,
Steve

Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function

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
Dragging to select multiple rows causes out of control scroll ronlee67 Excel Discussion (Misc queries) 7 February 14th 08 09:19 PM
Excel won't scroll downwards on sheet with autofilter & freeze pan gawley Excel Discussion (Misc queries) 0 November 6th 06 09:39 AM
View, scroll and select a cell value from another Excel sheet? benb Excel Worksheet Functions 1 October 12th 06 05:48 AM
Scroll bar increments select case? JeffMelton Excel Programming 2 March 7th 06 04:44 AM
Simple scroll and select? ste mac Excel Programming 2 April 21st 05 11:14 AM


All times are GMT +1. The time now is 11:45 PM.

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"