View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
IanKR IanKR is offline
external usenet poster
 
Posts: 97
Default Tell whether or not Sub B was called by Sub A?

May be you could have an argument to sub B:

sub B(byval sCallerProc as string)
if sCallerProc=A then
....
else
....
endif
end sub

that won't work if B is called directly by the user. It will need to fire
sub C that will fire sub B.

I'm not sure if I'm clear.


I didn't follow the Sub C bit, I'm afraid. Gary's reply covers it, with the
optional argument.