Link to home
Start Free TrialLog in
Avatar of brothertruffle880
brothertruffle880Flag for United States of America

asked on

Excel VBA - Public declaration of variables

I declared public variables in SHEET1 and referred to them in a procedure I was running in Module1. It didn't work.
I declared public variables in MODULE1 and referred to them in a procedure I was running in Sheet1. It did work.
Is this correct?
I thought a public variable could be declared anywhere and then referred to anywhere.
Avatar of Pawan Kumar
Pawan Kumar
Flag of India image

Hi,
Pls try.. <Not tested.>
 
New module->Global Pawan As Integer

Hope it helps!
SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial