Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Move a Picture to cell C1

I know how to move a picture around a sheet. Eg.,

ActiveSheet.Shapes("Picture 1").Select
Selection.ShapeRange.IncrementTop -5

I would like to move a picture to a particular cell.

Would you help me, please?

Thank you in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Move a Picture to cell C1

I should be a little more clear about what I would like to do.

I have a chessboard (colored cells) with pieces (picutes) on sheet.
I would like to run a macro to place the pieces back in their original
positions.
Since they are in different places each time, what I might be looking
for is a way to place them in a particular location on the sheet, not
necessarily referring to a cell.

Thanks again.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Move a Picture to cell C1

Try

Dim Pic As Picture
Set Pic = ActiveSheet.Pictures(1)
Pic.Top = Range("C1").Top
Pic.Left = Range("C1").Left


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Bill (Unique as my name)" wrote in
message
oups.com...
I know how to move a picture around a sheet. Eg.,

ActiveSheet.Shapes("Picture 1").Select
Selection.ShapeRange.IncrementTop -5

I would like to move a picture to a particular cell.

Would you help me, please?

Thank you in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Move a Picture to cell C1

or if putting them back on the "board" or to a specific square

Dim Pic As Picture
Dim s as String
s = "SqrR2C3" ' name of square "pic" where you are placing the piece
Set Pic = ActiveSheet.Pictures(1)
With Activesheet.Pictures(s)
Pic.Top = .Top + (.Height-Pic.Height)/2
Pic.Left = .Left + (.Width - Pic.Width)/2
End with



--
Regards,
Tom Ogilvy


"Chip Pearson" wrote in message
...
Try

Dim Pic As Picture
Set Pic = ActiveSheet.Pictures(1)
Pic.Top = Range("C1").Top
Pic.Left = Range("C1").Left


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Bill (Unique as my name)" wrote in message
oups.com...
I know how to move a picture around a sheet. Eg.,

ActiveSheet.Shapes("Picture 1").Select
Selection.ShapeRange.IncrementTop -5

I would like to move a picture to a particular cell.

Would you help me, please?

Thank you in advance.





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
How do I move and size a picture with a cell but keep the aspect r Gidmark Excel Discussion (Misc queries) 2 July 2nd 09 12:31 PM
Move a picture with a vba macro Secret Squirrel Excel Discussion (Misc queries) 9 May 18th 08 05:29 AM
move picture to behind cells Sarah[_3_] Excel Worksheet Functions 2 December 27th 07 12:23 PM
HOW TO: Move a picture to the top left or top right of a cell via Kevin McCartney Excel Programming 0 May 10th 06 05:46 PM
How would I move/insert a custom picture (button) onto the toolbar Sandee Excel Discussion (Misc queries) 2 April 20th 06 03:37 PM


All times are GMT +1. The time now is 02:06 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"