Possible to know who has called a function ?
Isabelle,
You can use a different argument in each calling function,
then identify the argument in the called function, something like...
'-----------------------
Function PrintPage()
PrintToPdf (0)
End Function
Function PrintPage1()
PrintToPdf (1)
End Function
Function PrintPage2()
PrintToPdf (2)
End Function
Function PrintToPdf(ByRef F As Long)
Select Case F
Case 0
'Do some code
MsgBox F
Case 1
'Do different code
MsgBox F
Case 2
'Do really different code
MsgBox F
End Select
End Function
'--------------------------
Regards,
Jim Cone
San Francisco, CA
"Isabelle Robin" wrote in message
...
Hi to all,
I would like to know if it is possible to know who has called a certain
function.
For example, I have three functions "printPage", "printPage1",
"printPage2" which can call another function "PrintToPdf".
I'm am in the "PrintToPdf" function. Is it possible to know which
function has called me ?
Thks for your answer
Best regards
|