The easiest is to use an inputbox
res = InputBox("Enter a month, ex: "Jan")
If you wanted to trigger this from a Refresh, you would need to instantiate
events for the query.
http://support.microsoft.com/kb/213187/en-us
XL2000: How to Use the Query BeforeRefresh and AfterRefresh Events
--
Regards,
Tom Ogilvy
"85225" wrote:
I am trying to create a user friendly document for my colleagues.
I have created an excel query that gets data from our back office system.
This query gets information for all 12 months of the year. From all this
data, a report needs to be created for 1 month of the data depending on which
month the user needs to create a report for. I would like the report to be
created automatically (through macros etc...) once the user has inputed which
month/year he requires.
I am not sure how to go about this. 1 alternative I was considering would be
to have a message box pop onto the screen and then from this box the user
could pick his month/yr and then I could grab the values in order to create
the required report. Or, another alternative would be to create a form that
the user could enter the info into and then I could grab the values in order
to create the required report.
I am having difficulty finding information on both of these ideas. Can
someone help me?
Thanks!