What is the easiest way for a SUB to know that it was called by other macro?
Right now, I use the following technique (and send a TRUE to 'Called' if so, else FALSE), but there has to be a more direct way. ... Any ideas?
![]()
Sub CallingSub() blah ... blah ... blah Call CalledSub(Called:=True) blah ... blah ... blah End Sub Sub CalledSub(Optional Called As Boolean = False) If Called = True Then GoTo Label_100 < do code that only matters if this sub was NOT Called > < GoTo Label_200 > Label_100 < do code that only matters if this sub was Called > Label_200 End Sub
Bookmarks