ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to define the default value? (https://www.excelbanter.com/excel-programming/442496-how-define-default-value.html)

Eric

How to define the default value?
 
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

JLatham

How to define the default value?
 
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.


"Eric" wrote:

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


JLGWhiz[_2_]

How to define the default value?
 
endChange = False


"Eric" wrote in message
...
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





All times are GMT +1. The time now is 09:57 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com