![]() |
Macro for variable picture
....
Sheets("Actions").Select Range("B16").Select sImageToLoad = Sheets("Macros").Range("A2") ActiveSheet.Pictures.Insert (sImageToLoad) ActiveSheet.Shapes ("Picture 37") Selection.ShapeRange.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 1.34, msoFalse, msoScaleFromTopLeft .... I need help with the proper format to make "Picture 37" a variable in the function. Each time this step is run in large macro, the picture number changes. Many thanks in advance. _Nate |
Macro for variable picture
PictureNumber = 137 PictureName = "Picture " & PictureNumber Sheets("Actions").Select Range("B16").Select sImageToLoad = Sheets("Macros").Range("A2") ActiveSheet.Pictures.Insert (sImageToLoad) ActiveSheet.Shapes (PictureName) Selection.ShapeRange.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 1.34, msoFalse, msoScaleFromTopLeft "_Nate" wrote: .... Sheets("Actions").Select Range("B16").Select sImageToLoad = Sheets("Macros").Range("A2") ActiveSheet.Pictures.Insert (sImageToLoad) ActiveSheet.Shapes ("Picture 37") Selection.ShapeRange.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 1.34, msoFalse, msoScaleFromTopLeft .... I need help with the proper format to make "Picture 37" a variable in the function. Each time this step is run in large macro, the picture number changes. Many thanks in advance. _Nate |
All times are GMT +1. The time now is 03:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com