Trouble with signature macro

vman5781

Board Regular
Joined
Dec 9, 2015
Messages
59
With the help of the forum I have a signature macro that had been working fine, but recently has been putting the signature of the person that last opens it into the file (suppose to be the signature of the person that performs the recon)

Below is the code that I have ben using (work sheet has 20 tabs, 1 for each employee) Signature for each employee saved on there own "g" drive

Any help would be appreciated to have when a signature is inserted, it locks it so it doesn't change

Code:
Sub SIGN()

' SIGN Macro
    Dim pictureSource As String
    pictureSource = "g:\signature\signature.JPG"
        
    Dim outputCell As String
    outputCell = "ActiveCell"
    
    Dim ws As Worksheet
    Set ws = ActiveSheet
    
    With ws.Pictures.Insert(pictureSource)
    
        .ShapeRange.LockAspectRatio = msoFalse
        .Left = ActiveCell.Left
        .Top = ActiveCell.Top
        .Width = ActiveCell.Width
        .Height = ActiveCell.Height
        
        
    End With

End Sub


Thank you

John
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
The code as-is seems to work fine, but which image gets inserted is entirely dependent on how drive letter g: is mapped, so if you are not getting the current user's .jpg, that's where I would start looking. The whole strategy of "locking" a signature graphic that you are pasting onto a worksheet seems dubious and I don't understand what you are doing enough to comment. Also, the code only seems to add signature images. It never removes them so after awhile you will have a bunch of images in the worksheet, which seems like a problem.
 
Upvote 0

Forum statistics

Threads
1,223,956
Messages
6,175,612
Members
452,660
Latest member
Zatman

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