I'm trying to get Excel to show a Userform (frmControl) at startup, but with Excel minimised.
Having Excel minimised is not a mandatory requirement, but aesthetically it would be nice!
frmControl is a sort of function selector, and a code representing the function eventually requested by the User is placed in the Userforms ".Tag".
I've put this code in ThisWorkbook
then in Startup
This just shows the Userform, with the Workbook showing behind it.
If I add "vbModeless" to the Show command, Excel and the Userform are both minimised, and the MsgBox in the minimised Excel is showing the default Tag value.
Am I attempting the impossible, or is it just beyond my puny skills?
I may also run in to problems later, because if I (and by "I" I hopefully mean "you") solve this problem, later on I may need to maximise Excel again, because for example one of the functions on frmControl is to show a specific Worksheet, on which will be a button which when clicked will return to the initial state, i.e. Excel minimised and frmControl showing.
Any help / pointers / suggestions will be thankfully received....
Having Excel minimised is not a mandatory requirement, but aesthetically it would be nice!
frmControl is a sort of function selector, and a code representing the function eventually requested by the User is placed in the Userforms ".Tag".
I've put this code in ThisWorkbook
Code:
Private Sub Workbook_Open()
Call Startup
End Sub
then in Startup
Code:
Public Sub Startup()
Application.WindowState = xlMinimized
frmControl.Show
MsgBox frmControl.Tag
End Sub 'Startup
This just shows the Userform, with the Workbook showing behind it.
If I add "vbModeless" to the Show command, Excel and the Userform are both minimised, and the MsgBox in the minimised Excel is showing the default Tag value.
Am I attempting the impossible, or is it just beyond my puny skills?
I may also run in to problems later, because if I (and by "I" I hopefully mean "you") solve this problem, later on I may need to maximise Excel again, because for example one of the functions on frmControl is to show a specific Worksheet, on which will be a button which when clicked will return to the initial state, i.e. Excel minimised and frmControl showing.
Any help / pointers / suggestions will be thankfully received....