Button visibility variable in vba

Button visibility variable in vba

Hi,

I want to access the visibility variable of a button inside a simbol, but i always get a "Object doesnÂ't support this porperty or method" error.

I have created a simbol with a text and a button.
In the button, the visibility button is set to "from variable", and the visibility variable prperty is set to "myStruct.Visibility".

there is a a vba macro linked to the LeftClickDown event from the button and i have this code in the macro:

Dim varit As Variable
Set varit = obElem.VisibilityVariable

At this point is where i get the error.

In the documentation is estated as available from VBA, and in the vba editor it can be chosen from the list to complete a sentence.

What am i doing wrong?

Thank you

This is a migrated post! Originally posted on 31.10.2016 by user redjon. Please be aware that information can be outdated.