sharing VBA variables between excel sheets -


i have 1 sheet vba code many variables , constants , use variables in vba code of sheet. unfortunately code split between sheets , requires shared variables , constants input parameters. possible in vba excel?

yes, must declare variables public variable [as type]. @matzone said, @ module level, i.e., before subs, functions or properties.

in case of variable duplication must refer module.variable, module module code name sheet1 or thisworkbook.

consider option of inserting module in vba project join shared variables (and functions, subs).


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -