ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to select one by one picture on my sheet with VBA? (https://www.excelbanter.com/excel-discussion-misc-queries/72494-how-select-one-one-picture-my-sheet-vba.html)

marko

How to select one by one picture on my sheet with VBA?
 
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


Leith Ross

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

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 Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=513885


Dave Peterson

How to select one by one picture on my sheet with VBA?
 
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.

marko wrote:

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


--

Dave Peterson

marko

How to select one by one picture on my sheet with VBA?
 
Thanks a million!!!
it works perfectly!!!!

Marko Svaco


marko

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

Marko Svaco



All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com