UserForm to Autofilter date ranges

Big Lar

Well-known Member
Joined
May 19, 2002
Messages
557
I have a UserForm that displays calculated values from my worksheet…select the date from ComboBox1 and the values for that date are displayed in several Textboxes.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I’d really like to produce a replacement UserForm that displays Month-to-date and Year-to-date values<o:p></o:p>
<o:p></o:p>
I’ve started with this to select the dates<o:p></o:p>
<o:p></o:p>
Code:
[FONT=Verdana][SIZE=1]Private Sub UserForm_Initialize()[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Dim x&<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]With Sheets("Sheet1")<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]For x = 2 To .Cells(Rows.Count, "A").End(xlUp).Row<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1][I]ComboBox1.AddItem (.Range("A" & x).Value)[/I][/SIZE][/FONT]
[FONT=Verdana][SIZE=1][I]ComboBox2.AddItem (.Range("A" & x).Value)[/I]<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]Next x<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]End With<o:p></o:p>[/SIZE][/FONT]
[FONT=Verdana][SIZE=1]End Sub[/SIZE][/FONT]
<o:p></o:p>
So, I select the beginning date with ComboBox1 and the ending date with Combobox2.<o:p></o:p>
<o:p></o:p>
I’m looking for suggestions on how to Autofilter the worksheet based on the selections…<o:p></o:p>
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,588
Messages
6,179,743
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top