Dear All,
I have the code below, however it is working only with .jpg format. Could you pls help me as I also want it to work with .png format.
Thank you!
--------------------------------
Public Function showpicture(style As String, Optional path As String) As String
If path = "" Then
path = "E:\CKUA\PICTURES"
End If
path = path & "\"
Dim AC As Range
Static P As Shape
On Error GoTo Done
Application.Volatile
Set AC = Application.Caller
PicFile = path & style & ".jpg"
If Not (PicExists(P)) Then
sheetname = Application.Caller.Parent.Name
workbookname = Application.Caller.Parent.Parent.Name
I have the code below, however it is working only with .jpg format. Could you pls help me as I also want it to work with .png format.
Thank you!
--------------------------------
Public Function showpicture(style As String, Optional path As String) As String
If path = "" Then
path = "E:\CKUA\PICTURES"
End If
path = path & "\"
Dim AC As Range
Static P As Shape
On Error GoTo Done
Application.Volatile
Set AC = Application.Caller
PicFile = path & style & ".jpg"
If Not (PicExists(P)) Then
sheetname = Application.Caller.Parent.Name
workbookname = Application.Caller.Parent.Parent.Name