Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Removing Picture from Cell Command Bar
Rick,
After you've added the control to the Cell commandbar, you can change it by addressing it this way: With Application.CommandBars("Cell").Controls("Alpha Sort Asc") Sheet1.Shapes(btnOtherTick).CopyPicture .PasteFace .Enabled = True End With Where, obviously, btnOtherTick is a variable containing the name of a valid shape object on Sheet1. HTH, Bernie Excel MVP "Rick De Marco" wrote in message om... Hi, I have a small problem and I was wondering if anyone could help. I am using the following code to add new buttons to the right click menu With Application.CommandBars("Cell").Controls.Add(msoCo ntrolButton, temporary:=True) Sheet1.Shapes(btnTick).CopyPicture .PasteFace .Enabled = False .Caption = "Alpha Sort Asc" End With This all works fine and I get a new menu item with the associated picture. The affect I am trying to make is - when a user right clicks on a cell and select one on my menu items I want to put a tick next to it, which I can do fine. My problem is that when a user selects a different menu item i then need to remove the picture from the previously selected item and move it to the newly selected. Can anyone tell me how I can remove the picture without deleting the menu item and adding it again? Basically I am trying to hide the picture if the menu item is not selected and make it visible if it is selected. Thanks, Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Removing a picture box from an Excel 2007 spreadsheet | Excel Worksheet Functions | |||
Removing a picture box in Excell 2007 | Excel Discussion (Misc queries) | |||
Inserting a Picture using Cell as picture name. | Links and Linking in Excel | |||
how do I insert picture into cell so vlookup can return picture? | Excel Worksheet Functions | |||
Removing "Save As" Command from an excel file. | Excel Worksheet Functions |