Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
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
Placing a regular excel function in VBA code [HOW?] gordom Excel Programming 4 March 10th 09 05:01 PM
Name picture in code, How. Corey Excel Programming 5 December 4th 06 11:59 PM
Help with placing Picture in background of a chart aj Charts and Charting in Excel 0 March 22nd 06 02:52 PM
Help with placing Picture in background of a chart aj Excel Programming 0 March 22nd 06 02:52 PM
Code to Insert a picture using VC++ keepitcool Excel Programming 1 May 28th 04 03:01 PM


All times are GMT +1. The time now is 12:38 AM.

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

About Us

"It's about Microsoft Excel"