I want to have a button to add a picture to a sheet. I thought I accomplished this with the code below, only to find out it only shows the pictures on my computer. Apparently this only links the file.
Can anyone help me so that this will save with the workbook and open on anyone's computer. There will only be a maximum of 50ish photos that are every loaded into this sheet at one time.
'Sub GetPic()
Dim fNameAndPath As Variant
Dim img As Picture
fNameAndPath = Application.GetOpenFilename(Title:="Select Picture To Be Imported")
If fNameAndPath = False Then Exit Sub
Set img = ActiveSheet.Pictures.Insert(fNameAndPath)
With img
'Resize Picture to fit in the range....
.Left = ActiveSheet.Range("E4").Left
.Top = ActiveSheet.Range("E4").Top
.Width = ActiveSheet.Range("E4:K4").Width
'.Height = ActiveSheet.Range("E4:E24").Height
.Placement = 1
.PrintObject = True
End With
'End Sub
Can anyone help me so that this will save with the workbook and open on anyone's computer. There will only be a maximum of 50ish photos that are every loaded into this sheet at one time.
'Sub GetPic()
Dim fNameAndPath As Variant
Dim img As Picture
fNameAndPath = Application.GetOpenFilename(Title:="Select Picture To Be Imported")
If fNameAndPath = False Then Exit Sub
Set img = ActiveSheet.Pictures.Insert(fNameAndPath)
With img
'Resize Picture to fit in the range....
.Left = ActiveSheet.Range("E4").Left
.Top = ActiveSheet.Range("E4").Top
.Width = ActiveSheet.Range("E4:K4").Width
'.Height = ActiveSheet.Range("E4:E24").Height
.Placement = 1
.PrintObject = True
End With
'End Sub