RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 788
- Office Version
- 2010
- Platform
- Windows
Hi all, can't seem to get the last piece of the puzzle...
I have a series of subs within a module where they all reference the "workbook year", which I want to set as 2020 just once in the code. I've declared it as such:
However when I run, I get:
"Invalid outside procedure"
All the guides I can see online show you how to set up a global variable, but not how to define what that variable is.
Thanks!
I have a series of subs within a module where they all reference the "workbook year", which I want to set as 2020 just once in the code. I've declared it as such:
VBA Code:
Public wbyr as Integer
wbyr = 2020
However when I run, I get:
"Invalid outside procedure"
All the guides I can see online show you how to set up a global variable, but not how to define what that variable is.
Thanks!