![]() |
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. |
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. |
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. |
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. |
All times are GMT +1. The time now is 11:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com