Simple Autofilter

  • Thread starter Thread starter Ewing25
  • Start date Start date
E

Ewing25

All i want to do is make it so Userform2 shows when the workbook is open.

It will prompt the user for a number (TextBox1). Excel then uses that number
to autofilter Worksheet("Expense") which Goes from A2 to I559

Then is dropped into cells A2 in Worksheet("Miles") and Worksheet"(Expense
Non-AMEX)

Any Idea how to do this?

Thanks!
 
How does the number affect your autofilter?

To get you started, you will need an Auto_Open macro to load and show
UserForm2:
Sub auto_open()
Load UserForm2
UserForm2.Show
End Sub

Do the autofiltering in the UserForm2 code...Once again, I don't know what
you meant by "Excel then uses that number to autofilter Worksheet("Expense")
which Goes from A2 to I559." How's that? Where does the user's number come
into play?

As for using the textbox's value, before unloading your UserForm, run this
code:
Sheets("Miles").Cells(2,1).Value = TextBox1.Value
Sheets("Expense Non-AMEX").Cells(2,1).Value = TextBox1.Value

Hope this helps, Jim
 

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

Back
Top