2

VB6 had some source code attributes visible only when one exported the module to a text file. An example would be to set the DispID to 0 for a default or -4 for an For Each enumerator. VBA has theoretically the same but sometimes they have no effect in VBA.

What does VB_VarMemberFlags do in VBA? I know its an attribute for a module level variable. I have seen in some old source code some typical values of 200 or 40 but does this affect anything in VBA?

StayOnTarget
  • 11,743
  • 10
  • 52
  • 81
S Meaden
  • 8,050
  • 3
  • 34
  • 65
  • Related: https://stackoverflow.com/questions/33648764/what-does-the-attribute-keyword-do-in-vb6 which doesn't seem to mention this particular attribute for some reason. – StayOnTarget Jan 02 '19 at 12:40
  • @DaveInCaz: thanks for linking question (it's good that now it will appear top of the list of questions down the right hand column). A full list of similar reserved keywords can be found on page 37 of the VBA language specification, https://msdn.microsoft.com/en-us/library/dd361851.aspx – S Meaden Jan 02 '19 at 15:08

1 Answers1

3

It would appear nothing in VBA. It's for VB6 and records the checkboxes in the Advanced section of the Procedure Attributes dialog box. For posterity,

  • Hide this member = VB_VarMemberFlags = "40"
  • User Interface Default = VB_VarMemberFlags = "200"
  • Don't show in Property Browser = VB_VarMemberFlags = "400"

The bottom two only impact in VB6 environment I think.

In constrast Hide this member has an external impact for a type library. Hide this member on a method will apply the hidden IDL attribute (but VBA users browsing the library can still see by using the Show hidden members menu option).

In summary, nothing to see.

S Meaden
  • 8,050
  • 3
  • 34
  • 65