upobDaPlaya
asked on
Is it possible to present a user with selection criteria when they run a macro
In the attached spreadsheet I want to be able to prompt someone to select a Salesperson, Initial Visit, and a FollowUp Date. Once the person selects these 3 criteria I wanted to delete any rows not part of the selection. Unfortunately the person who would use the spreadsheet is awful with auto filters. (An autofilter would be ideal as it would capture the subset of data she needs.)
Thus, I wanted her to click on a macro button from a separate spreadsheet (as the current spreadsheet always gets overwritten every day). There may be a better solution than creating a macro, but I'm trying to get some ideas. I just bought the book called Excel 2010 "Power Programming with VBA" by John Walkenback, but I have not found a solution.
Since I am trying to learn Excel VBA if you could give me a starting point I am sure I could finish the rest by Googling and also the book I bought. ee-filter.xls
Thus, I wanted her to click on a macro button from a separate spreadsheet (as the current spreadsheet always gets overwritten every day). There may be a better solution than creating a macro, but I'm trying to get some ideas. I just bought the book called Excel 2010 "Power Programming with VBA" by John Walkenback, but I have not found a solution.
Since I am trying to learn Excel VBA if you could give me a starting point I am sure I could finish the rest by Googling and also the book I bought. ee-filter.xls
ASKER
I am getting a Run Time error 91 - Object Variable or With Block Variable Not Set when I open the spreadsheet. When I debug it is highlighting the below line...thx
Selection.AutoFilter Field:=4
Selection.AutoFilter Field:=4
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your time and follow-up
Its kinda multi step process
First - I am making list of Unique names and then taking in to drop down
And then based on selection of name - press Update 1 (which runs macro - changes pivot with names and lists date) so kind of dependent list (date for related names) and gets unique dates
After selecting dates, press Update2 filters data on sheet 1 based on the selected value
Good Luck !
Copy-of-ee-filter.xls