Jump to content

Recommended Posts

Posted

Hello,

In sysmac studio, for a NA hmi, is there a way to access a button in Visual basic from a global subroutine ?

I always get this when i compile : error BC30456: 'MyPage' is not a member of 'My_NA_HMI'.

the code is : My_NA_HMI.MyPage.myButton.IsEnabled = True

 

Regards,


Posted

From what I know, global subroutines do not interact with page components. So I would just assign a global variable to the button variable property you need to enable and set it to True directly with the global variable.

Posted

I finally moved my global subroutines locally to the concerned pages. and used global variables to enable the ones I need.

Thank you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...