0% found this document useful (0 votes)
2 views10 pages

Excle Code For Sign

The document contains two VBA macros for Excel that insert a signature image and the current date into specified cells of an active worksheet. The first macro, 'SignWithImageAndDate', places a signature in cell B23 and the date in the same cell, while the second macro, 'AddSignatureInC23', inserts a signature in cell C23 and the date in C24. Both macros include formatting options for text alignment and font size.

Uploaded by

toloh90859
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views10 pages

Excle Code For Sign

The document contains two VBA macros for Excel that insert a signature image and the current date into specified cells of an active worksheet. The first macro, 'SignWithImageAndDate', places a signature in cell B23 and the date in the same cell, while the second macro, 'AddSignatureInC23', inserts a signature in cell C23 and the date in C24. Both macros include formatting options for text alignment and font size.

Uploaded by

toloh90859
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Sub SignWithImageAndDate()

Dim ws As Worksheet

Dim sigPic As Picture

Dim imgPath As String

Set ws = ActiveSheet

imgPath = "C:\Users\Administrator\Pictures\Camera Roll\[Link]" ' Change to your image path

With [Link]("A23")

.Value = "Prepared By:"

.HorizontalAlignment = xlLeft

.VerticalAlignment = xlCenter

.[Link] = 8

.[Link] = True

End With

Set sigPic = [Link](imgPath)

With sigPic

.Top = [Link]("B23").Top + 2

.Left = [Link]("B23").Left + 10

.[Link] = msoTrue

.Height = 30 ' Adjust size as needed

End With

With [Link]("B23")

.Value = Format(Date, "dd-mm-yyyy")

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlBottom

.[Link] = 8

End With

End Sub
C23---

Sub AddSignatureInC23()

Dim ws As Worksheet

Dim sigPic As Picture

Dim imgPath As String

Set ws = ActiveSheet

imgPath = "C:\Users\YourName\Pictures\[Link]" ' Change to your image path

' Insert signature image in C23

Set sigPic = [Link](imgPath)

With sigPic

.Top = [Link]("C23").Top + 2

.Left = [Link]("C23").Left + 10

.[Link] = msoTrue

.Height = 30 ' Adjust size as needed

End With

' Insert date below signature in C24 (format: dd-mm-yyyy)

With [Link]("C24")

.Value = Format(Date, "dd-mm-yyyy")

.HorizontalAlignment = xlCenter

.VerticalAlignment = xlCenter

.[Link] = 8

End With

End Sub
CODE FOR
SIGN
SIGN AND
DATE
WITH OUT
DATE
The document appears to be a comprehensive outline or table of contents for a

COMPUTER SCIENCE AND KNOWLEDEG FOR EXCLE SHEET CODE USING

MACRO, detailing various topics and subtopics related to EXCLE, It includes along

with references to specific years and data points. The structure suggests a focus on

both theoretical frameworks and practical applications within the field of studies.
CODE FOR
SIGN
Sub SignWithImageAndDate()
Dim ws As Worksheet
Dim sigPic As Picture
Dim imgPath As String

Set ws = ActiveSheet
imgPath = "C:\Users\Administrator\Pictures\Camera
Roll\[Link]" ' Change to your image path

With [Link]("A23")
.Value = "Prepared By:"
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlCenter
.[Link] = 8
.[Link] = True
End With

Set sigPic = [Link](imgPath)


With sigPic
.Top = [Link]("B23").Top + 2
.Left = [Link]("B23").Left + 10
.[Link] = msoTrue
.Height = 30 ' Adjust size as needed
End With

With [Link]("B23")
.Value = Format(Date, "dd-mm-yyyy")
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.[Link] = 8
End With
End Sub
END OF
DOCUMENT

You might also like