I created a user form AboutBox that open to the form with the excel application not visible. The form has a command button that when clicked should go to Sheet1 of my workbook and close the form. It works ok when I'm testing in VB but when I close the workbook and reopen, the form appears, I click the button and it goes away and does not leave open Sheet1. My code is as follows.
ThisWorkbook
Private Sub Workbook_Open()
Application.Visible = False
AboutBox.Show
End Sub
Form AboutBox
Private Sub UserForm_Click()
End Sub
Command Button
Private Sub OKButton_Click()
Sheet1.Activate
Unload AboutBox
End Sub
Module1
Sub ShowDialog()
Sheet1.Activate
End Sub
ThisWorkbook
Private Sub Workbook_Open()
Application.Visible = False
AboutBox.Show
End Sub
Form AboutBox
Private Sub UserForm_Click()
End Sub
Command Button
Private Sub OKButton_Click()
Sheet1.Activate
Unload AboutBox
End Sub
Module1
Sub ShowDialog()
Sheet1.Activate
End Sub