Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a Macro to update a Macro?

Status
Not open for further replies.

SysAdminsDaughter

Technical User
Sep 17, 2003
3
US
Hi! I'm working with my father on trying to make a prgram more "user-friendly" for someone else. He has a coworker who will be running reports and intead of having the person hunt through the macro to enter the previous day's date, he wants to create a popup that will take the user's entered date and change the macro.

I know how to create the popup, but I am not sure if a macro can run on top of a macro (nesting?). Or better yet, is there coding that can be put in place of a manual date that will pull the date from what is entered into the popup?

Have I sufficiently confused everyone in what I am trying to do? :)

Thanks!

Jenn
 
Hi SysAdminsDaughter,

I think I'm sufficiently confused.

I think all you want to do is set a variable from the input ..

Code:
Dim DateVar As Date
DateVar = Inputbox("Please enter Date (dd/mm/yyyy)")

You might want to do some validation on the input, but other than that you've got your date fairly close to where you want it.

Enjoy,
Tony
 
Thanks TonyJollans!

Now the date in the input box is used to pull information from other programs and dump it into Excel. Currently the user has to manually change the date in the macro. We want to tie entering the date into an inputbox so that it will go through and automatically change the date in the macro to what the user is requesting.

I haven't seen the script yet, I am waiting for my father to hand it to me.
 
Hi SysAdminsDaughter,

I think you need to see the code to go further. Ask again if you're stuck when you have it.

Enjoy,
Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top