Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 8
Default Deleting pictures in Excel using visual basic

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

  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 709
Default Deleting pictures in Excel using visual basic

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

--
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

wrote in message
oups.com...
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



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 8
Default Deleting pictures in Excel using visual basic

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
Paul B wrote:
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

--
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

wrote in message
oups.com...
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


  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11,123
Default Deleting pictures in Excel using visual basic

Hi Brijolito

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


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



wrote in message ups.com...
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
Paul B wrote:
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

--
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

wrote in message
oups.com...
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




Reply
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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Excel Visual Basic Error cmar Excel Discussion (Misc queries) 2 June 10th 06 12:13 AM
Offline office help will not work in excel word or visual basic AlanHuddersfield Excel Discussion (Misc queries) 0 June 2nd 06 12:51 AM
Visual Basic I/O error when opening Excel file SK Low Excel Worksheet Functions 0 November 24th 05 09:52 AM
Create and Use Button Menu using visual Basic in Excel Walter L. skinner Excel Discussion (Misc queries) 3 November 17th 05 11:40 AM


All times are GMT +1. The time now is 05:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"