Posted: Mon Jan 19, 2009 10:48 pm Post subject: New to VBA-Trying to store a variable
I am brand spanking new to VBA and am trying to figure out some of the basics of VBA. This issue will probably come as really basic to everyone except myself right now but I hope to change that in time
I am trying to figure out how to store a value as a variable in VBA for later use (in a seperate sub). For example, I would like an input box request a value then store that value.
I am finding that when I store a variable, it is only "saved" while that sub is running. If I try to call that variable from another sub, it looses the value I assigned previously.
I was researching a little about static variables but I cannot get that to work either. When attempting to run the below subs, I get a blank message box. Any suggestions for how to store user data that can be called upon from other subs later?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum