I have butchered an existing code to get an image inserted and now i am trying to get the white background transparent.
This is what i have so far but i get a bug at .PictureFormat
Any ideas ?
This is what i have so far but i get a bug at .PictureFormat
Any ideas ?
VBA Code:
Public Sub LoadOCMSignature()
LookupOCMSignature
If Dir(OCMSignaturePath) <> vbNullString Then
With ActiveSheet.Pictures.Insert(OCMSignaturePath)
If .Width / .Height < 1.575 Then
.Top = Range("OCMSignature").Top
.Left = Range("OCMSignature").Left
Else
.Top = Range("OCMSignature").Top
.Left = Range("OCMSignature").Left
End If
With .PictureFormat
.TransparentBackground = True
.TransparencyColor = RGB(255, 255, 255)
End With
.Fill.Visible = False
End With
Else
If dispMsgBox = True Then
MsgBox DemImage3Path & vbCrLf & "This link to the image is not available. Please check the availability of the file in the right directory"
End If
End If
End Sub