Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / October 2006

Tip: Looking for answers? Try searching our database.

Deleting pictures in Excel using visual basic

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
brujolito@gmail.com - 05 Oct 2006 09:18 GMT
I have written a visual basic module to insert pictures from a list
contained in a worksheet. I have figured out how to delete the picture
when I load the next picture. For this I need to know the picture
number.

My problem is the indexing or the picture number. The number of shapes
ActiveSheet.Shapes.Count doesn't change But the picture number does
increment. I am using workaround by updating the picture number in a
cell on the active sheet BUT this is a kluge! More importantly, I will
be using this to display a large number of images [1000s 100000s]. I
don't know wheter there is an upper limit, but it would be cleaner if
the pic number always reset.

I am using Excel 2004 for the MAC [OSX]

Thanks

Brujolito
Paul B - 05 Oct 2006 11:51 GMT
Brujolito, if you want to delete ALL the pictures you could try this

ActiveSheet.Pictures.Delete

this works for a PC not sure if it will work with Mac version

Signature

Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

> I have written a visual basic module to insert pictures from a list
> contained in a worksheet. I have figured out how to delete the picture
[quoted text clipped - 14 lines]
>
> Brujolito
brujolito@gmail.com - 05 Oct 2006 21:42 GMT
Thanks Paul:

Tried it. Works sorta...., the next picture loads, when selected the
object identification id: 'Picture 626, 627' etc even though there is
only one picture on the sheet. This does help in that I no longer need
the cell on the sheet to keep track of the picture for the purpose of
deleting it. If I create a drawing shape such as an autoshape it is
'autoshape 629'. I guess that it works but it will get cumbersome down
the road.

Thanks. It is at least good to know that one operation that works on
the PC works on the Mac

Brijolito
> Brujolito, if you want to delete ALL the pictures you could try this
>
[quoted text clipped - 27 lines]
> >
> > Brujolito
Ron de Bruin - 06 Oct 2006 19:48 GMT
Hi Brijolito

See this page also
http://www.rondebruin.nl/controlsobjectsworksheet.htm

Signature

Regards Ron de Bruin
http://www.rondebruin.nl

> Thanks Paul:
>
[quoted text clipped - 41 lines]
>> >
>> > Brujolito

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.