Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling placement of pictures with VBA in Excel. 1

Status
Not open for further replies.

sec12205

Technical User
May 1, 2002
2
US
How do I code the pasting of pictures in a worksheet to ensure they don't overlap? Is there a way to find out the edge of a picture then paste after it (or something like that)?

Thanks!
 
Hi.

Each object has the following properties that you can use to position without overlapping...
Top
Left
Width
Height

So if you had Three objects that you wanted to align at the top 2 across & 2 down...
Code:
With obj1
   .Top = 0
   .Left = 0

   obj2.Top = .Top
   obj2.Left = .Left + .Width

   obj3.Top = .Top + .Height
   obj3.Left = .Left
End With
Hope this helps :)

Skip,
Skip@TheOfficeExperts.com
 
Skip, that is SO cool!

No more counting and working out positions for me!

YDM

Crash
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top