I am trying to have a sub run a series of other subs but am not having much luck. The Sub looks like this:
Private Sub OKCommand_Click()
new_tab
metric_transfer
End Sub
When I comment out the first sub, the second sub runs. I put in Debug.Print comments above and below the second sub and watched it run right over the sub without calling it. I tried putting Call
and Application.Run
in front but the former did nothing and the latter was the wrong approach. My example follows this but it is unclear if the matter was ever resolved in that case. I didn't try this delay technique as it didn't appear to work for them either. Any help would be greatly appreciated.
Many thanks to @Matteo for pointing me in the right direction. The problem that I encountered was the result of an Unload Me
line in the new_tab
sub. All of these procedures were on the user form. When Unload Me
executed, it wiped the userform from memory as described here. It appears that hiding the form would have been the better option with form1.Hide
. Not only because of the issues this caused here but also because I would need information from this form at a later point.