LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default auto filter use with command button

Dear All,

This program run in the work sheet , its working fine. but need to use
the program in use of command button is not working fine ,

can any body sort out issue(same program run thru command button).


Private Sub Worksheet_Change(ByVal Target As Range)
Const inputCell = "$B$1" ' must have the $ symbols
If Target.Address < inputCell Then
Exit Sub
End If
Application.ScreenUpdating = False
Range("B2").Select ' get read to set AutoFilter
If IsEmpty(Target) Or _
Trim(Target) = "" Or _
UCase(Trim(Target)) = "ALL" Then
'need to show all
Selection.AutoFilter field:=2
Else
'need to filter by B1 entry
Selection.AutoFilter field:=2,
Criteria1:=UCase(Trim(Target.Value))
End If
Range(inputCell).Select
Application.ScreenUpdating = True
End Sub

Regars,

Deen
 
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
Separate Button for Auto Filter Selected Range Nasir Naqvi New Users to Excel 2 December 6th 06 03:15 PM
Auto Filter Toolbar Button Does not Toggle Pastel Hughes Excel Discussion (Misc queries) 2 October 26th 06 09:25 PM
Auto filter through the Comman Button irsath Excel Worksheet Functions 2 July 3rd 06 01:04 PM
Is it possible to change the blue colour of an activated Auto Filter button? Marcel Wilmink via OfficeKB.com Excel Discussion (Misc queries) 1 February 24th 05 08:35 PM
The Auto Filter button lost the column specified option. D Excel Worksheet Functions 1 November 4th 04 11:47 PM


All times are GMT +1. The time now is 01:43 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"