I have this code to insert my pictures half size into a certain cell. How can I get it to give the option to choose another picture and insert it the next available cell? Here's my code:
Sub EmbedPicture()
Dim sPicture As String, pic As Picture
ChDir "C:\Pathname\"
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "Select Picture to Import")
If sPicture = "False" Then Exit Sub
Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
ActivateCell:
.ShapeRange.ScaleHeight 0.5, msoFalse, msoScaleFromTopLeft
.Top = Range("B36").Top
.Left = Range("B36").Left
End With
Set pic = Nothing
End Sub
Thanks!
Sub EmbedPicture()
Dim sPicture As String, pic As Picture
ChDir "C:\Pathname\"
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "Select Picture to Import")
If sPicture = "False" Then Exit Sub
Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
ActivateCell:
.ShapeRange.ScaleHeight 0.5, msoFalse, msoScaleFromTopLeft
.Top = Range("B36").Top
.Left = Range("B36").Left
End With
Set pic = Nothing
End Sub
Thanks!