scecnic74uk
New Member
- Joined
- Aug 15, 2020
- Messages
- 7
- Office Version
- 365
- Platform
- Windows
I have this code
Public attachFile As Variant
Public filecount As Integer
Public signimage As Picture
So what i thought was supposed to happen, it uploads a picture of a signature then saves the excel macro-enabled file, then someone opens the macro-enabled file and adds their signature and so on and so forth. However when any other person opens it shows "the linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify the link points to the correct file or location."
Where did I go wrong?
VBA Code:
Range("e27").Select 'Select cell where the signature is going.
attachFile = Application.GetOpenFilename(FileFilter:="Picture Files (*.jpg;*.bmp;*.png), *.jpg;*.bmp;*.png", Title:="Select Signature File") 'Prompt to upload the signature file.
If attachFile = False Then Exit Sub 'If no file uploaded exit the subroutine.
Set signimage = ActiveSheet.Pictures.Insert(attachFile) 'Attach image
With signimage
'Resize Picture to fit in the range....
.Left = Range("e27").Left + (Range("e27:f27").Width - .Width) / 2 'centre image
.Top = Range("e27").Top + (Range("e27:f27").Height - .Height) / 2 'centre image
.Placement = 1
.PrintObject = True
End With
Public attachFile As Variant
Public filecount As Integer
Public signimage As Picture
So what i thought was supposed to happen, it uploads a picture of a signature then saves the excel macro-enabled file, then someone opens the macro-enabled file and adds their signature and so on and so forth. However when any other person opens it shows "the linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify the link points to the correct file or location."
Where did I go wrong?