PC Review


Reply
Thread Tools Rate Thread

Change CommandBarButton state not working

 
 
Dale Fye
Guest
Posts: n/a
 
      27th Nov 2007

This was working yesterday, but now it is not. I have a custom popup menu
on a userform (this works great) that contains a PrintPreview button, that I
want to change the state from msoButtonUp to msoButtonDown, and reverse when
I click on the button. The following code was working, but now is not, any
ideas?

Public Sub FilePrintPreview()

Dim ctrl As CommandBarButton
Set ctrl = Application.CommandBars.FindControl(Tag:="FilePrintPreview")

'Changes the buttons state from Down->Up or Up->Down
ctrl.State = IIf(ctrl.State = msoButtonDown, msoButtonUp, msoButtonDown)

End Sub

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

Email address is not valid.
Please reply to newsgroup only.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Row state not working John Microsoft ADO .NET 1 3rd Oct 2008 01:49 AM
Row state not working John Microsoft VB .NET 1 3rd Oct 2008 01:49 AM
CommandbarButton.Execute method not working for drawing shapes Jeff Abbott Microsoft Excel Programming 3 20th Jun 2008 04:53 PM
trouble with commandbarbutton.state =?Utf-8?B?V2F6b29saQ==?= Microsoft Excel Programming 1 26th May 2005 09:18 PM
Session State not working rkmoray Microsoft ASP .NET 2 22nd Jul 2004 04:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 PM.