Can you set a variable for an entire module?

bbalch

Board Regular
Joined
Feb 23, 2015
Messages
53
I have a module that contains several subs. Each of the subs contain the variable below where the "period" is updated by 1 each month. So next month the 1019 would become 1119, then 1219.... Since each sub contains this variable you must update the "period" in every sub.

Is there a way to set the "period" variable once so that it applies to the entire module? I'm trying to only have one place to update instead of updating in all subs.

Code:
Dim period As String
period = "1019" ' update to current fiscal period
Thanks.
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

Watch MrExcel Video

Forum statistics

Threads
1,090,550
Messages
5,415,223
Members
403,573
Latest member
ballardgirl

This Week's Hot Topics

Top