Add picture to file on shared folder.

scecnic74uk

New Member
Joined
Aug 15, 2020
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I have this code

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?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top