CommandBarButtons not working properly

D

Dale Fye

Working in Excel 2003, have posted to the Excel Programming group wanted to
try a wider audience (please excuse the multi-post).

I've created a custom popup menu for use in an Excel userform. Until late
yesterday, it was working properly, not sure what happened but am having a
couple of problems now.

1. When I change the state of a command button (msoButtonUp,
msoButtonDown), its state value changes properly and can be read via code,
but the appearance of the button does not change. When it is down, it should
appear checked, but does not.

2. I also have two lines of code that either enable or disable two of my
CommandBarButtons based on the value of a multipage (tab) control.

Application.CommandBars.FindControl(Tag:="FilePrintCapability").Enabled =
(intTabNum = 0)
Application.CommandBars.FindControl(Tag:="FilePrintGap").Enabled =
(intTabNum = 1)

These two lines of code should be enabling one button and disabling another,
but are doing nothing. The Enabled property of both these buttons is
staying as
True regardless of the value of intTabNum.

Any help would be greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top