Boolean Variable Definition

J

James

Hi, Quick question here, I hope
how do I keep a boolean variable = true and keep that value for every sub or
function that might use it? im having problems when going from one
sub/function to another. The variable keeps getting reset to = "Empty". Do i
actually have to pass it from function to function? What if its used in a
sub? or am i missing something? Thanks
 
M

Mike H

Hi


Declare it as Public


Public MyVar As Boolean
Sub mysub()
MyVar = True
End Sub

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top