ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Ribbon visual state gets refreshed when multiple like workbooksopened (https://www.excelbanter.com/excel-programming/415765-ribbon-visual-state-gets-refreshed-when-multiple-like-workbooksopened.html)

[email protected]

Ribbon visual state gets refreshed when multiple like workbooksopened
 
Hi All,

Is this a known Ribbon issue? When you open two like workbooks, the
later workbook essentially refreshes the visual state of the original
workbook. This effects ribbon controls with state such as
checkboxes. It seems the internal state of the original workbook is
not changed (thus the internal VBA state gets out of sync with the
visual state).

I have a workbook that opens other like workbooks to aggregate data
across all user workbooks. After the aggregation macro runs if
checkboxes were selected on the original, prior to the macro running,
afterwards visually they are cleared (internally the VBA code still
has the variables as selected).

Any idea as to workarounds (i.e. pushing the visual state of the
checkbox back to checked or reading the visual state to resyn the
internal variables).

Thanks,
Paul

[email protected]

Ribbon visual state gets refreshed when multiple like workbooksopened
 
On Aug 16, 11:31*am, wrote:
Hi All,

Is this *a known Ribbon issue? *


After poking around a bit, it turns out that any other workbook which
installed a custom ribbon tab visually resets the stateful controls.
So I added a getPressed() callback routine to explicitly return the
current state of that particular button.


When you open two like workbooks, the
later workbook essentially refreshes the visual state of the original
workbook. *This effects ribbon controls with state such as
checkboxes. *It seems the internal state of the original workbook is
not changed (thus the internal VBA state gets out of sync with the
visual state).

I have a workbook that opens other like workbooks to aggregate data
across all user workbooks. *After the aggregation macro runs if
checkboxes were selected on the original, prior to the macro running,
afterwards visually they are cleared (internally the VBA code still
has the variables as selected).

Any idea as to workarounds (i.e. pushing the visual state of the
checkbox back to checked or reading the visual state to resyn the
internal variables).

Thanks,
Paul




All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com