How to select one by one picture on my sheet with VBA?

  • Thread starter Thread starter marko
  • Start date Start date
M

marko

Hi!

How can i select one by one picture on my sheet through VBA
"for each pic in Activesheet.pictures...?
and how do i have to define(dim) my picture, dim pic as???
please help. thanks!

Marko Svaco
 
Hello Marko,

A Picture belongs to the Shapes class of the Worksheet it is on.

Dim Pic As Shape
For Each Pic In Activesheet.Shapes
If Pic.Type = msoPicture Then
Pic.Select
End If
Next Pic

Sincerely,
Leith Ros
 
dim pic as picture

should work ok, too.

If you use the object browser (F2 in the VBE), you can show hidden elements and
still see the picture object.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top