Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I move and size a picture with a cell but keep the aspect r | Excel Discussion (Misc queries) | |||
Move a picture with a vba macro | Excel Discussion (Misc queries) | |||
move picture to behind cells | Excel Worksheet Functions | |||
HOW TO: Move a picture to the top left or top right of a cell via | Excel Programming | |||
How would I move/insert a custom picture (button) onto the toolbar | Excel Discussion (Misc queries) |