是否可以在VBA中定义用户定义类型的常量?

时间:2017-05-23 07:39:08

标签: vba data-structures constants

我对VBA比较陌生,想知道是否可以定义一个用户定义类型的常量?例如;

shopt -s globstar
awk '/pattern/ { print FILENAME }' **/*
# unset it later (optional, e.g. if within a script)
# shopt -u globstar

1 个答案:

答案 0 :(得分:2)

据我所知,你不能,但为什么不将它包装在一个函数中并返回默认值?

Public Function StdCheckAttribsDefault() As StdCheckAttribs
    With StdCheckAttribsDefault
        .Description = "Some value"
        .Length = 100
        .EndOption = "Some value"
    End With
End Function