Good evening
I am using Excel 2019 and have a UserForm named UserForm 1.
I wish to run a subroutine stored in the UserForm using a variable created in another subroutine in the UserForm. eg.
Option Explicit
Public Test As String
Private Sub1()
Test = "Sub2"
Application.Run Test
End Sub
Private Sub2()
' Subroutine actions
End Sub
I can use Application.Run to run a subroutine called Sub 2 in Module 1 but can't figure out how to run it in my userform code.
Unfortunately I wasn't able to work it out from previous posts on this forum.
Many thanks
I am using Excel 2019 and have a UserForm named UserForm 1.
I wish to run a subroutine stored in the UserForm using a variable created in another subroutine in the UserForm. eg.
Option Explicit
Public Test As String
Private Sub1()
Test = "Sub2"
Application.Run Test
End Sub
Private Sub2()
' Subroutine actions
End Sub
I can use Application.Run to run a subroutine called Sub 2 in Module 1 but can't figure out how to run it in my userform code.
Unfortunately I wasn't able to work it out from previous posts on this forum.
Many thanks