Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 441
Default Arranging graphical objects on sheet

I have a program that copies several images and pastes them sequentially into
a single Excel sheet.

Does anyone have a function that can position each successive image
immediately below, but not overlapping the previously copied image? If you
could supply example code it would be most appreciated.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Arranging graphical objects on sheet

assign the top attribute of the new image to the sum of the top and height
attributes of the previous image.

--
Regards,
Tom Ogivly

"quartz" wrote in message
...
I have a program that copies several images and pastes them sequentially

into
a single Excel sheet.

Does anyone have a function that can position each successive image
immediately below, but not overlapping the previously copied image? If you
could supply example code it would be most appreciated.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 212
Default Arranging graphical objects on sheet

Example copying pix from Sheet2 to Sheet1:

Dim shp As Shape, shpSh1 As Shape
Dim i
Sheet1.Select
Sheet1.Range("A1").Select
For Each shp In Sheet2.Shapes
shp.CopyPicture
Sheet1.Paste
i = Sheet1.Shapes.Count
Set shpSh1 = Sheet1.Shapes(i)
If i 1 Then
shpSh1.Left = Sheet1.Shapes(i - 1).Left
shpSh1.Top = Sheet1.Shapes(i - 1).Top _
+ Sheet1.Shapes(i - 1).Height
'If you want to match th height and width too
' then keep below 2 lines, else delete them
shpSh1.Height = Sheet1.Shapes(i - 1).Height
shpSh1Width= Sheet1.Shapes(i - 1).Width
End If
Next

Sharad

"quartz" wrote in message
...
I have a program that copies several images and pastes them sequentially
into
a single Excel sheet.

Does anyone have a function that can position each successive image
immediately below, but not overlapping the previously copied image? If you
could supply example code it would be most appreciated.




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
Different objects-same sheet gunshybars Excel Discussion (Misc queries) 1 August 29th 08 02:03 PM
Macros (Graphical Objects) ?? Sunday88310 Excel Discussion (Misc queries) 0 March 19th 07 07:05 PM
Macro's and Graphical Objects Sunday88310 Excel Discussion (Misc queries) 3 March 19th 07 05:14 PM
Unable to remove Sheet objects in the Microsoft Excel Objects Adrian[_7_] Excel Programming 1 August 26th 04 10:49 PM
Cannot shift objects off sheet Tomek[_2_] Excel Programming 0 July 17th 03 05:15 PM


All times are GMT +1. The time now is 04:58 PM.

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

About Us

"It's about Microsoft Excel"