Thinking outside the box

  • Thread starter Thread starter Robert Couchman
  • Start date Start date
R

Robert Couchman

Hello and good morning!

yes!! i have finally started to think outside of the box
for my timetable form.. and its working so far!!!

just a query...

is there any way that i can set an autofilter to the
contents of a selected value in a combobox?

e.g. i select "15/03/2004" and the filter will display any
where the value is "15/03/2004"

thank you,

Robert Couchman
([email protected])
 
Please ignore last message as i had realised that all i
had to do was set the criteria1:- timetable.combobox1.value

and that was all!!

thank you,

Robert Couchman
 
Steps required are as follows

1. Right click on any toolbar and select control toolbox
2. Select the combo tool and create your combo
3. Right click on the combo and select properties
4. Change the combo's name to cb1, and the listfillrange property t
the name of a range where you have defined the values that you want t
appear in your combo
5. Double-click on the combo and in the default Change event procedur
in vba enter:
Sheets("SheetWithFilter").Activate
ActiveSheet.Cells(1, 1).Select
Selection.AutoFilter Field:=3, Criteria1:=Me.cb1.Value

Change:
*the sheet name to the name of your sheet
*cells(1,1) to a cell within your filtered list
*3 to the number of the column in your list that you want to selec
your filter value

Do
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Very visual basic 10
IF... change colour 4
looking for values 3
Anyone can help 5
Back to the brick wall!! 1
thought process 3
How to make efficient use of tools 2
Textbox problem 11

Back
Top