I have a VB.net project which consists of one main Form with about 5 buttons on.
When clicking on a button, this will open another Form using the button_click Sub. What I would like it to do is open the form but run a macro in the background and then close the form. The form is a kind of splash screen, a "waiting" message while code is running so it will be called multiple times from all of the buttons in the main form. For example, this is my code...
Expand|Select|Wrap|Line Numbers
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles butCancel.Click
- ConnectionForm.ShowDialog()
- Call Macro1()
- ConnectionForm.Dispose()
- End Sub
I could put Macro1 inside the ConnectionForm_Load sub, but it will be a generic welcome message and it doesn't want to run the same macro every time it opens.
Anyone come across this before and have a simple solution?