Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing picture with code
Excel 2003
I have a sheet with only a graph. With a macro I want to insert a picture on the sheet. I want the picture to be on the upper half of the sheet and centered. I use this macro; ActiveChart.Pictures.Paste.Select Selection.ShapeRange.IncrementLeft 219# Selection.ShapeRange.IncrementTop 171.75 This works perfectly with my stationary computer. But when I run the macro on a laptop the picture is not in the right position. How do I solve this problem? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Placing picture with code
Johan
Try to give the object a absolute position instead of a relative one: like this-- Sub position_of_picture() ActiveSheet.Shapes(1).Select Selection.ShapeRange.Left = 100 Selection.ShapeRange.Top = 50 End Sub try to play with the 100 and 50 figures..... Good luck |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Placing a regular excel function in VBA code [HOW?] | Excel Programming | |||
Name picture in code, How. | Excel Programming | |||
Help with placing Picture in background of a chart | Charts and Charting in Excel | |||
Help with placing Picture in background of a chart | Excel Programming | |||
Code to Insert a picture using VC++ | Excel Programming |