Does VBA have a way for an executing macro to determine the name of the macro that called it?
Does VBA have a way for an executing macro to determine the name of the macro that called it?
You can setup your macros like this.
Option Explicit Sub MyMacro() Call Macro1("MyMacro") End Sub Sub Macro1(Optional MyCaller As String) MsgBox MyCaller End Sub
Yeah, I've taken that approach before, but somehow it seems clumsy to me. I'd really prefer executing a VBA command of some sort, if such exists. Thanx for the reply.