common input variable for 3 called modules

grunschlange

New Member
Joined
Sep 12, 2009
Messages
13
Hello.

I have the following code which calls procedures in 3 separate modules:


Sub UpdateMonthlyDDFiles()
'
' UpdateMonthlyDDFiles Macro
'
'
Call OpenActiveCasesDD
Call OpenAppActivityDD
Call OpenMonthlySOPDD
End Sub

In each module is code to check data for 6 offices. I update my data monthly, so there is an InputBox line asking for the month of report for each office:

myMonth = Application.InputBox("Enter the month of report.")

This means that when I run the "UpdateMonthlyDDFiles" macro, I am entering the month of report 18 times.

Is there a way to establish one InputBox line at the start of this macro that will read the variable in each of the other modules, so that I don't have to enter the month 18 times?

Thanks.
Let me know if you need more information for this inquiry.
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,224,518
Messages
6,179,245
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top