Macro for variable picture

N

_Nate

....
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
 
J

Joel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top