I'm just new on this site and i am struggling with vba code i am using, the problem is when i use my picture insert code the program seem to work well with me, but when i transfer the file to other persons computer including the folder where all those photos are taken from the photo does not appear, they seem to be are missing.
the code i am using is as follows.
Sub InsertPictures ()
Dim sPictures As String, pic As Picture
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.jpeg; *.bmp; *.tif), *.gif; *.jpg; *.jpeg; *.bmp; *.tif", _, "Select Picture to Import")
If sPicture = "False" Then Exit Sub
Set pic = ActiveSheet.Pictures.Insert(sPicture)
With pic
.ShapeRange.LockAspectRatio = msoFalse
.Height = 208
.Width = 285
.ShapeRange.IncrementLeft 2
.ShapeRange.IncrementTop 1.5
.Placement = 1
End With
Set pic = Nothing
End Sub
your inputs, suggestion, comments and even corrections to my code are highly appreciated.
cheers.