How to define the default value?

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

I would like to set the default value to be false, does anyone have any
suggestions on how to do it in Excel?
Thanks in advance for any suggestions
Eric

Public endChange As Boolean
 
The default value for a Boolean is False when it is declared. No problem -
it's already done for you.

Want proof? Put this code right below it and run it repeatedly using F5:
Sub TestEndChange()
MsgBox "endChange is " & endChange
endChange = Not endChange
End Sub

First time you run it, you'll see it is False. After that, it toggles
between True and False.
 

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

Back
Top