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: 24
Default Macro to delete an Object

In Excel 2003 I have a macro that inserts a pdf file into a spreadsheet. When
I run the macro it inserts the pdf file in and the object is assigned a name
Object 11; the next time I run the macro it inserts the pdf file in and the
object is assigned a name Object 12, and so on. I am fine with that part.

Now I want to record a macro to clear the object from the worksheet. The
problem is that since the object name is changing from Object 11 to Object
12. So when I go to record the macro it will delete the object.

But when I run the macro again to insert the pdf and then try to run the
macro to delete the pdf the macro fails since it cannot find the object that
I want to delete.

I guess the bottom line question is - is there a way to name an object when
inserted into a spreadsheet so that it always named Object 1?

Thanks for any help.
 
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
Can't delete object! DennisFonthill Excel Discussion (Misc queries) 1 February 7th 10 07:59 PM
Delete all object Steven Excel Programming 1 May 20th 08 01:30 AM
delete group not object karmela Excel Programming 3 November 30th 07 11:05 AM
delete OLE object sorin Excel Programming 1 October 21st 05 02:45 PM
Cannot delete object TVFTH Excel Discussion (Misc queries) 2 March 25th 05 02:15 AM


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