LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Commandbar works first pass, but not thereafter

I've added a commandbar (see code below) to my userform, which pops up
another userform. The first time I open this command bar and click on the
POC Info button, it opens the second form properly, but when I select click
on the label that pops this menu up a second time, there is a check in front
of the POC Info option, and clicking on it does nothing.

Any ideas what I am doing wrong?

Sub OptionsMenu()

Dim CmdBar As Office.CommandBar
Dim ctrl As Office.CommandBarControl

On Error Resume Next
Application.CommandBars("MyOptions").Delete
On Error GoTo 0

Set CmdBar = Application.CommandBars.Add(Name:="MyOptions", _

Position:=msoBarPopup, _
temporary:=True)

Set ctrl = CmdBar.Controls.Add(Type:=msoControlButton)
With ctrl
.Caption = "POC info"
.OnAction = "POC_Info"
End With

End Sub

Public Sub POC_Info()

Userform1.Hide
frm_POC_Info.Show
Userform1.Show

End Sub

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

Email address is not valid.
Please reply to newsgroup only.
 
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
pass value to excel userform - is there a constructor? how to pass Rich Excel Programming 6 August 14th 07 09:18 AM
Macros: Step Thru Works, Run Works, Keyboard Shortcut Locks up BEEJAY Excel Programming 2 October 3rd 06 06:46 PM
Excel Addin works that works on a template workbook s.jay_k Excel Programming 0 February 15th 06 07:31 PM
it works, it doesn work, its works....and so on. Naz Excel Programming 6 September 30th 05 01:52 PM
How do I convert works file to excel without works software? CatMB Excel Discussion (Misc queries) 1 June 21st 05 04:12 PM


All times are GMT +1. The time now is 07:25 AM.

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"