Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listbox and vba auto filter

XL2K3 Listbox
A B C D
RG 1 8 9
8P 2 1 3
Total 12

RG 1 8
2P
8P 2 1
7P

The top rows above 'Total' are a List box (filtered).
below 'Total' are rows with value (RG,2P) summing up to the ListBox.
I recorded a macro and copied it into:

Private Sub Worksheet_Change(ByVal Target As Range)
If xx 0 Then
xx = 0
On Error GoTo 0
Exit Sub
End If
xx = 0
On Error Resume Next
Range("E4").Select
Worksheets("sheet 1").ShowAllData
On Error GoTo 0
Range("E4").Select
xx = 1
Selection.AutoFilter Field:=4, Criteria1:="0", Operator:=xlAnd
' range("C11").Select
End Sub

This works, but the ListBox stays active and the List box filter does not
filter until after I select another cell outside the List box.

Can a List Box be automated like this or do you need to loop through using
'long hand' VBA counts and items....
Any Help appreciated.
TIA


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
How to filter listbox data in a form? Vinod Excel Discussion (Misc queries) 1 January 11th 10 02:01 PM
DataFilterAuto Filter in excel 2007? TIJ New Users to Excel 2 November 13th 08 03:28 AM
Setting and filter Listbox data Gizmo63 Excel Discussion (Misc queries) 1 February 5th 07 04:03 PM
ListBox filter GMet Excel Programming 5 September 27th 04 10:11 PM
Filter Listbox in user form Nikki[_3_] Excel Programming 0 August 29th 04 12:23 AM


All times are GMT +1. The time now is 11:02 AM.

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

About Us

"It's about Microsoft Excel"