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: 17
Default Customizing commandbar problems

I am trying to customize the shapes commandbar on a
worksheet activation and continually get an error when I
attempt to delete the format object... item from the menu.

"Invalid procedure call or argument"

This is a one time error message and then it seems to
disappear any other times I access the worksheet while the
workbook is open.

Does anyone have any insight into this as it is becoming
very frustrating.

David

Private Sub Worksheet_Activate()
Application.CommandBars("Shapes").Reset
Application.CommandBars("Shapes").Enabled = True
Application.OnKey "^x", "CompDelete"
Application.OnKey "{delete}", "CompDelete"
Application.OnKey "{insert}", "CompInsert"
With Application.CommandBars("Shapes")
.Controls.Add(Type:=msoControlButton,
Befo=1).Caption = "Insert Picture"
.Controls("Insert Picture").OnAction = "CompInsert"
.Controls("Insert Picture").FaceId = 295
.Controls.Add(Type:=msoControlButton,
Befo=1).Caption = "Delete Picture"
.Controls("Delete Picture").OnAction = "CompDelete"
.Controls("Delete Picture").FaceId = 292
.Controls("Format Object...").Delete
.Controls("Cut").Delete
.Controls("Paste").Delete
.Controls("Copy").Delete
.Controls("Grouping").Delete
.Controls("Order").Delete
.Controls("Assign Macro...").Delete
.Controls("Set Autoshape Defaults").Delete
.Controls("Hyperlink...").Delete
End With

End Sub
 
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
commandbar problems Richard Cook Excel Discussion (Misc queries) 1 July 8th 05 05:32 PM
Add-In needs to create CommandBar lucp Excel Programming 8 June 27th 04 01:46 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
commandbar hunt defj Excel Programming 2 November 17th 03 11:40 PM
Moving CommandBar using VBA or C# Aaron Queenan Excel Programming 1 October 31st 03 03:20 PM


All times are GMT +1. The time now is 12:21 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"