Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem renaming command buttons with code
Hi all,
I have an issue where data is copied and pasted from an email into a sheet where the data must be pasted in as Paste All -- the issue is that there are objects of some sort that get pasted in also. When the code executes, I want to have the objects (which get pasted in with the names "AutoShape 2544", "AutoShape 2545", etc.) deleted. The problem is that I have two command buttons from the Control Toolbox on the sheet so if I use the code below, the command buttons also get deleted. Any idea on how I can select all shapes but the two command buttons (Names "CommandButton1" and "CommandButton2")? Sheets("Sheet1").Activate Shapes.SelectAll Selection.Delete Thanks, -- Robert |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code for Command Buttons | Excel Discussion (Misc queries) | |||
VBA code to find macros associated with command buttons in an s/s | Excel Programming | |||
Changing Control Object Name( command buttons etc ) from VBA code | Excel Programming | |||
Renaming Worksheet Command Buttons | Excel Programming | |||
Command buttons and code - help!! | Excel Programming |