Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is it possible to present a user with selection criteria when they run a macro

Posted on 2011-09-14
4
Medium Priority
?
191 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:upobDaPlaya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 9

Expert Comment

by:hitsdoshi1
ID: 36540866
Ok...I was manage to do what you needed.

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
0
 

Author Comment

by:upobDaPlaya
ID: 36546967
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
0
 
LVL 9

Accepted Solution

by:
hitsdoshi1 earned 2000 total points
ID: 36550338
There you go.....I fixed it and it works great now.


Copy-of-ee-filter.xls
0
 

Author Closing Comment

by:upobDaPlaya
ID: 36564419
Thanks for your time and follow-up
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question