P
Paul Martin
Hi all
I have 2 issues:
============================================================================
### 1 ###
I have added some custom buttons with some custom code to the Standard
toolbar in XL-xp and they work fine, and I want them to 'gray-out'
when there's no workbook open (just like built-in buttons).
I tried adding some code to the Workbook_Open, Workbook_New and
Workbook_Close events of Personal.xls as follows:
If Workbooks.Count <= 2 Then
CommandBars("Standard").Controls("Custom").Enabled = False
Else
CommandBars("Standard").Controls("Custom").Enabled = True
End If
Though I have similar code working fine in Word, this code does not
execute when I open a workbook. Any suggestions appreciated.
============================================================================
### 2 ###
With the above buttons, I am using toggle buttons from the Control
Toolbox. Although the code executes fine, the buttons do not
alternate between the usual 'toggle-on' and 'toggle-off' styles. Any
suggestions on how to achieve this?
Thanks in advance
Paul Martin
Melbourne, Australia
I have 2 issues:
============================================================================
### 1 ###
I have added some custom buttons with some custom code to the Standard
toolbar in XL-xp and they work fine, and I want them to 'gray-out'
when there's no workbook open (just like built-in buttons).
I tried adding some code to the Workbook_Open, Workbook_New and
Workbook_Close events of Personal.xls as follows:
If Workbooks.Count <= 2 Then
CommandBars("Standard").Controls("Custom").Enabled = False
Else
CommandBars("Standard").Controls("Custom").Enabled = True
End If
Though I have similar code working fine in Word, this code does not
execute when I open a workbook. Any suggestions appreciated.
============================================================================
### 2 ###
With the above buttons, I am using toggle buttons from the Control
Toolbox. Although the code executes fine, the buttons do not
alternate between the usual 'toggle-on' and 'toggle-off' styles. Any
suggestions on how to achieve this?
Thanks in advance
Paul Martin
Melbourne, Australia