I am trying to create a simple log function in my Excel VBA project.
I want to pass the current procedure name and string
now the log function is as follows:
Public Sub log(procName As String, message As String)
dolog (procName & ": " & message)
End Sub
I try to call it this way:
Dim C_PROC_NAME As String
C_PROC_NAME = "autoSave"
log(C_PROC_NAME, "test")
This does not work, it seems to me that I am doing it like this:
test = log(C_PROC_NAME, "test")
And initializing C_PROC_NAME like this DOES NOT work:
DIM C_PROC_NAME As String = "autoSave"
source
share