Hey everyone,
I've been trying to solve the problem for a while now, but I cannot find a suitable solution online.
I have created a custom Ribbon which is loaded as an Add-In into my Workbooks. In this Ribbon I have a Toggle Button A and some other button, let's call it Button B. What I need is the follwing:
When pressing Button B, a specified procedure is taking place. During this procedure I need to know whether the Toggle Button A is pressed or not. Is there any way / function to easily read the stat of the button? I already tried to declare a boolean to store the value each time the toggle button is pressed (onAction), but unfortunately the variable is not stored in each Workbook seperately. So if I have two Workbooks open, it might happen that the toggle button is pressed, but the variable is false as this is the state in another Workbook.
Maybe anyone has a clever solution for this. It seems like a basic problem to me, to read the state of a button, but I still can't find a solution.
Many thanks and best regards,
Jan
I've been trying to solve the problem for a while now, but I cannot find a suitable solution online.
I have created a custom Ribbon which is loaded as an Add-In into my Workbooks. In this Ribbon I have a Toggle Button A and some other button, let's call it Button B. What I need is the follwing:
When pressing Button B, a specified procedure is taking place. During this procedure I need to know whether the Toggle Button A is pressed or not. Is there any way / function to easily read the stat of the button? I already tried to declare a boolean to store the value each time the toggle button is pressed (onAction), but unfortunately the variable is not stored in each Workbook seperately. So if I have two Workbooks open, it might happen that the toggle button is pressed, but the variable is false as this is the state in another Workbook.
Maybe anyone has a clever solution for this. It seems like a basic problem to me, to read the state of a button, but I still can't find a solution.
Many thanks and best regards,
Jan