Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default CommandBarButtons not responding

The problem seems to go beyond my previous post about the "state" not
changing. Actually, the stat is changing, it is just not being displayed in
the popup menu; and it gets more intriguing. I have two lines of code that
either enable or disable two of my CommandBarButtons based on the value of a
multipage control.

Application.CommandBars.FindControl(Tag:="FilePrin tCapability").Enabled =
(intTabNum = 0)
Application.CommandBars.FindControl(Tag:="FilePrin tGap").Enabled =
(intTabNum = 1)

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

Any help would be greatly appreciated.

Dale
--

Email address is not valid.
Please reply to newsgroup only.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default CommandBarButtons not responding

Hi
Try:
-if you have a 'On Error Resume Next' before setting the Enabled property,
then comment it out and try running again. (could be that the FindCOntrol
doesn't find anything and so the 'Enabled =' would do nothing).
- what is the datatype of intTabNum
- just before and after '...Enabled =', try
debug.print (intTabNum = 0)
debug.print (intTabNum = 1)
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Dale Fye" wrote:

The problem seems to go beyond my previous post about the "state" not
changing. Actually, the stat is changing, it is just not being displayed in
the popup menu; and it gets more intriguing. I have two lines of code that
either enable or disable two of my CommandBarButtons based on the value of a
multipage control.

Application.CommandBars.FindControl(Tag:="FilePrin tCapability").Enabled =
(intTabNum = 0)
Application.CommandBars.FindControl(Tag:="FilePrin tGap").Enabled =
(intTabNum = 1)

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

Any help would be greatly appreciated.

Dale
--

Email address is not valid.
Please reply to newsgroup only.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default CommandBarButtons not responding

Sebastien,

When I step through my code, and print the value of the Enabled property of
each of these buttons, they are correct, one is enabled, the other disabled,
but when I popup the menu, both items appear and respond as if they are
enabled.

Generally the same issue with changing the state of another button, the
state property of the button displays the correct value when it is printed,
but when the state = msoButtonDown, the button should display a checkbox, and
it doesn't.

I thought that maybe I was creating another copy of a commandbar that
already exists, but confirmed that the commandbars are deleted and recreated
in the initialize event of the form.

Help!!!!!!!!!!!!!!!!!

Dale
--
Don''t forget to rate the post if it was helpful!

Email address is not valid.
Please reply to newsgroup only.

"sebastienm" wrote:

Hi
Try:
-if you have a 'On Error Resume Next' before setting the Enabled property,
then comment it out and try running again. (could be that the FindCOntrol
doesn't find anything and so the 'Enabled =' would do nothing).
- what is the datatype of intTabNum
- just before and after '...Enabled =', try
debug.print (intTabNum = 0)
debug.print (intTabNum = 1)
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Dale Fye" wrote:

The problem seems to go beyond my previous post about the "state" not
changing. Actually, the stat is changing, it is just not being displayed in
the popup menu; and it gets more intriguing. I have two lines of code that
either enable or disable two of my CommandBarButtons based on the value of a
multipage control.

Application.CommandBars.FindControl(Tag:="FilePrin tCapability").Enabled =
(intTabNum = 0)
Application.CommandBars.FindControl(Tag:="FilePrin tGap").Enabled =
(intTabNum = 1)

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

Any help would be greatly appreciated.

Dale
--

Email address is not valid.
Please reply to newsgroup only.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not responding...... Steve Excel Worksheet Functions 0 November 23rd 09 10:25 PM
why does it say not responding genyjoL New Users to Excel 2 October 22nd 09 05:13 AM
Excel Not Responding [email protected] Excel Discussion (Misc queries) 1 June 7th 09 11:57 AM
Excel Not Responding Floydene Excel Discussion (Misc queries) 5 May 27th 09 01:47 PM
non-responding chart Gene Excel Discussion (Misc queries) 0 May 5th 09 06:28 AM


All times are GMT +1. The time now is 06:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"