.
This macro will position a PNG image in the cell indicated.
For testing purposes the cell is presently set at F46.
Code:
Sub CenterInCell()
Dim myImage As Shape
Dim cellLocation As Range
Set myImage = ActiveSheet.Shapes("Picture1")
Set cellLocation = ActiveSheet.Range("F46")
myImage.Top = cellLocation.Top + (cellLocation.Height / 2) - (myImage.Height / 2)
myImage.Left = cellLocation.Left + (cellLocation.Width / 2) - (myImage.Width / 2)
End Sub
The code is generic in nature. The PNG image does not need to be placed inside an ActiveX Image Control.
The PNG image can be pasted directly to the worksheet.
The only thing required now is to know which cell the PNG image should be placed in .... and determine a
convenient method of activating the macro.
For example: is there any reason why the PNG image cannot be located at the bottom of all sheets in the workbook rather than
having to move it from one sheet to another ?
If the image must be moved from one sheet to another, would the presence of a command button at the bottom of each worksheet
present a problem ? Each button would be connected to the macro. The user would only need to click the button to create the PNG signature
image at the bottom of the sheet.
If any of the sheets need to be printed with the signature, the command button should not appear in the printing.
Let me know your thoughts.