Instead of preventing Excel from maximizing, why don't you simply make the application invisible, whenever your form is open? Here's a sample. Post back if this is not what you needed.
I've just added a few lines to check the visibility toggle, by simply clicking on the userform. But this code you can remove, and is not required for what you were looking for.
Code in user-form
Code:
Option Explicit
Dim bln As Boolean
Private Sub UserForm_Activate()
Application.Visible = False
bln = True
End Sub
Private Sub UserForm_Click()
Application.Visible = bln
bln = Not Application.Visible
End Sub
Private Sub UserForm_Terminate()
Application.Visible = True
End Sub
Code in Workbook module (to activate the form immediately )
Code:
Option Explicit
Private Sub Workbook_Open()
frmTest.Show
End Sub
Bookmarks