I'm trying to set up an Excel workbook so that, when it starts, it does so minimised, but showing a userform. What actually happens however is that the workbook is minimised (and it's task-bar icon is flashing) but the userform is not visible until the user clicks on the task-bar icon.
Here is my code:
When the user clciks the task-bar icon, Excel stays minimised and the userform displays. This is the state I want it to be in, but I don't want the user to have to click the taskbar icon to get there.
Can anyone suggest what I'm doing wrong?
Thanks,
Tony
Here is my code:
Code:
Dim oldstate As Long
On Error Resume Next
oldstate = Application.WindowState
Load ufrm_ConvertImage
ufrm_ConvertImage.setstate oldstate
ufrm_ConvertImage.SetParent Application
Application.WindowState = xlMinimized
ufrm_ConvertImage.Show
When the user clciks the task-bar icon, Excel stays minimised and the userform displays. This is the state I want it to be in, but I don't want the user to have to click the taskbar icon to get there.
Can anyone suggest what I'm doing wrong?
Thanks,
Tony