ActiveSheet.Pictures.Insert question

antaeusguy

Board Regular
Joined
Mar 8, 2010
Messages
81
Hello

I've a workbook which contains 50 worksheets. I want to insert a small picture (a company logo) in cell A1 in each worksheets.

I used the macro recorder to insert a single picture into a single worksheet and it gives this code:

Code:
    ActiveSheet.Pictures.Insert( _
        "C:\Documents and Settings\edmund\My Documents\My _
         Pictures\Logo.jpg").Select

I decided that I can write a for each.... next loop to do this.

However, I wanted to find out more about the Pictures object in the Object Browser but it is unavailable.

Activesheet is a Sheet object, I look into the Sheet class (Sheet1, Sheet2, Sheet3 etc..) but couldn't find Pictures listed as one of 'Sheet' members in the Object Browser... neither it's in the Sheets class.

Does anyone knows where to find more information about the Pictures object and it's member Insert? Thank you.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
The Pictures Class is a member of the Excel library but it is hidden in the Object browser and VBA intellsense by default that's why you can't find it.

to see it , display the Object browser in the VBE ,right click on the Find icon and choose "Show hidden members" from the context menu.
do a search and you will get the following info :

Class Pictures
Member of Excel

 
Upvote 0
Thanks Jaafar, that's really interesting :)

Thanks for your great help! After choosing "Show hidden members", I was able to locate the hidden member "Pictures" and it's method "Insert".

Interestingly, I can't find any help topics on it... seems like the help topics isn't available for hidden members.

I was wondering, why some members are hidden? What is the purpose of having hidden members... hmm.. I can't comprehend..
 
Upvote 0
Thanks Jaafar, that's really interesting :)

Thanks for your great help! After choosing "Show hidden members", I was able to locate the hidden member "Pictures" and it's method "Insert".

Interestingly, I can't find any help topics on it... seems like the help topics isn't available for hidden members.

I was wondering, why some members are hidden? What is the purpose of having hidden members... hmm.. I can't comprehend..

As far as I understand it, the hidden members tend to be obsolete but can still be used for backward compatibility although they may not exist/be supported in future releases of the software. They are not documented at least in my installed 2007 .
 
Upvote 0

Forum statistics

Threads
1,213,551
Messages
6,114,267
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top