So when I press a button on my excel workbook a userform pops up showing that the macro is running.
Now I want the caption of the button captured in a variable.
And I was able to do this, however I want to use this variable in the macro that the buttons triggers.
But the userform pop-up makes it that it first runs an other macro.
To clarrify this is what the button triggers:
Where the caption is capture in variable A.![]()
Sub MainInvMov() 'Call the StartProcessing procedure to show the Processing_Dialog 'with the label "Processing, Please Wait..." and execute MyMacro. A = ActiveSheet.Buttons(Application.Caller).Caption StartProcessing " Creating Report, " _ & vbNewLine & " Please Wait...", "InvMov" End Sub
But as you see this macro lauched macr 'InvMov'
And in that macro I want to use A
But I cannot because when the macro switched from 'MainInMov' to 'InvMov' it loses variable A.
Any ideas how to fixed this (if possible)?
Thanks.
Bookmarks