[英]Declaration of a block of public const variables in VBA
I would like to declare a large number of public constant variables in VBA. 我想在VBA中声明大量公共常量。 Is it necessary that I must prepend each and every variable with public const?
我是否必须在每个变量前面加上公共const?
ie 即
Public Const varA as Integer = 1
Public Const varB as Integer = 3
Public Const varC as Integer = 9
Thank you. 谢谢。
No, actually you do not need to include Public Const
before each value, you only need it before the first value if it is formatted like this: 不,实际上,您不需要在每个值之前都包含
Public Const
,如果它的格式如下,则只需在第一个值之前包含它:
Public Const varA As Integer = 1, _
varB As Integer = 3, _
varC As Integer = 9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.