I want to copy a certain picture (photo) from one sheet to another depending on the value of a variable. So if the variable = 1 then I copy Picture 1 if it's 2 I copy Picture 2 etc.
I have this to copy a hardcoded picture:
Can someone tell me what the syntax is to change "Picture 2" to something like "Picture x"
Thanks, Chris
I have this to copy a hardcoded picture:
Code:
Sub CopyOnePicture()
Dim wsSource As Worksheet
Dim wsDest As Worksheet
Set wsSource = Worksheets("Who")
Set wsDest = Worksheets("table")
Set pic = wsSource.Pictures("Picture 2")
pic.Copy
wsDest.Paste
With wsDest.Pictures(wsDest.Pictures.Count)
.Left = pic.Left
.Top = pic.Top
End With
End Sub
Can someone tell me what the syntax is to change "Picture 2" to something like "Picture x"
Thanks, Chris