Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Precisely reposition a graphic

Hello.

I have a graphical object on a sheet and it is selected.
I need to move this object so that the top left corner of
the object is EXACTLY on the top left corner of cell "B2".

My code so far:

Dim objShape As Shape
Set objShape = ActiveSheet.Shapes(strSnapShotName)

objShape.?????

Please fill in what I need to do...thanks much in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Precisely reposition a graphic

This worked for me:

Option Explicit
Sub testme01()
Dim objShape As Shape
With ActiveSheet
Set objShape = .Shapes(1) 'changed for testing!
With .Range("b2")
objShape.Top = .Top
objShape.Left = .Left
End With
End With
End Sub




quartz wrote:

Hello.

I have a graphical object on a sheet and it is selected.
I need to move this object so that the top left corner of
the object is EXACTLY on the top left corner of cell "B2".

My code so far:

Dim objShape As Shape
Set objShape = ActiveSheet.Shapes(strSnapShotName)

objShape.?????

Please fill in what I need to do...thanks much in advance.


--

Dave Peterson

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
reposition user form Chad New Users to Excel 0 April 29th 08 09:49 PM
reposition windows amsterdam-quick Excel Discussion (Misc queries) 2 January 25th 08 08:42 PM
Excel2007 -- Precisely set plot area size? Cassie Charts and Charting in Excel 3 October 5th 07 10:34 PM
Trying to fit and position images precisely Carlo Excel Discussion (Misc queries) 0 November 28th 06 09:28 AM
Calculate years between two dates more precisely Jørn Johansen Excel Programming 4 October 31st 03 06:57 PM


All times are GMT +1. The time now is 02:41 AM.

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"