Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Excel Office for Mac > Re: worksheet m...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 6 Topic 5581 of 6234
Post > Topic >>

Re: worksheet menu bar

by =?Utf-8?B?RGVi?= <Deb@[EMAIL PROTECTED] > May 6, 2008 at 02:38 PM

Thanks,  I let you know how i make out.

Deb

"JE McGimpsey" wrote:

> In article <D681B529-A9A3-4EA0-A715-74FC97780E15@[EMAIL PROTECTED]
>,
>  Deb <Deb@[EMAIL PROTECTED]
> wrote:
> 
> > 2002
> 
> 
> This is a newsgroup for Mac XL (hence the .mac. in the title), but this 
> is one way you can do it in any version other than MacXL08:
> 
> Put this in the worksheet code module (right-click the worksheet tab and

> choose View Code):
> 
>     Private Sub Worksheet_Activate()
>         'Create a new bar, or make changes...
>         'For instance:
>         On Error GoTo ResetMenu
>         With Application.CommandBars(1)
>             With .Controls.Add( _
>                         Type:=msoControlPopup, Tem****ary:=True)
>                 .Caption = "My Menu"
>                 .Tag = "MyMenu"
>                 With .Controls.Add( _
>                         Type:=msoControlButton, Tem****ary:=True)
>                     .Caption = "My Control"
>                     .Tag = "MyControl"
>                     .OnAction = "MyMacro"
>                     .Style = msoButtonCaption
>                     .TooltipText = "run my macro"
>                     .Visible = True
>                     .Enabled = True
>                 End With
>                 .Visible = True
>                 .Enabled = True
>             End With
>         End With
>    ExitActivate:
>         Exit Sub
>    ResetMenu:
>         Application.CommandBars(1).Reset
>         Resume ExitActivate
>     End Sub
> 
>     Private Sub Worksheet_Deactivate()
>         On Error GoTo EndDeactivate
>         'Either restore the original bar,
>         'undo the individual changes (preferred), e.g.:
>         Application.CommandBars.FindControl(Tag:="MyMenu").Delete
>         'or
>         'Application.CommandBars(1).Reset
>    ExitDeactivate:
>         Exit Sub
>    EndDeactivate:
>         'handle error here - or reset menu bar
>         Resume ExitDeactivate
>     End Sub
>
 




 6 Posts in Topic:
worksheet menu bar
=?Utf-8?B?RGVi?= <Deb@  2008-05-03 16:29:00 
Re: worksheet menu bar
Jim Gordon MVP <goldke  2008-05-04 12:58:49 
Re: worksheet menu bar
=?Utf-8?B?RGVi?= <Deb@  2008-05-04 10:11:00 
Re: worksheet menu bar
JE McGimpsey <jemcgimp  2008-05-06 09:03:43 
Re: worksheet menu bar
=?Utf-8?B?RGVi?= <Deb@  2008-05-06 14:38:04 
Re: worksheet menu bar
=?Utf-8?B?RGVi?= <Deb@  2008-05-08 14:06:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Sep 6 16:46:29 CDT 2008.