ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   window minimize (https://www.excelbanter.com/excel-programming/271709-re-window-minimize.html)

Tom Ogilvy

window minimize
 
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
Applicaton.Visible = True
End Sub

Might do something similar to what you want.

or

Private Sub workbook_open()
ThisWorkbook.Windows(1).Visible = False
start_screen.Show
ThisWorkbook.Windows(1).Visible = True
End Sub

Regards,
Tom Ogilvy


"Joe" wrote in message
...
I would like to minimize the current excel workbook when
the file is opened and only display a user form. The
problem is, when i do this the only way i can see the form
is to click on the minimized file. The code is simple but
the form will not popup on the screen. If this makes
sense does anyone have any suggestions? Here is the code
I am using.

Private Sub workbook_open()
Application.WindowState = xlMinimized
start_screen.Show
End Sub

Thanks in advance


Joe




Dan E[_2_]

window minimize
 
I would suggest putting the "Application.Visible = True" under the userform
"Userform_Terminate" event.
ie.
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub

Excel wouldn't re_open using the first code, until I opened another
workbook.

Dan E

"Tom Ogilvy" wrote in message
...
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
Applicaton.Visible = True
End Sub

Might do something similar to what you want.

or

Private Sub workbook_open()
ThisWorkbook.Windows(1).Visible = False
start_screen.Show
ThisWorkbook.Windows(1).Visible = True
End Sub

Regards,
Tom Ogilvy


"Joe" wrote in message
...
I would like to minimize the current excel workbook when
the file is opened and only display a user form. The
problem is, when i do this the only way i can see the form
is to click on the minimized file. The code is simple but
the form will not popup on the screen. If this makes
sense does anyone have any suggestions? Here is the code
I am using.

Private Sub workbook_open()
Application.WindowState = xlMinimized
start_screen.Show
End Sub

Thanks in advance


Joe






Tom Ogilvy

window minimize
 
That may be a good approach, but worked fine for me as written. I have a
button on the userform that the user clicks to close the userform although
this could be done with application.OnTime.

Regards,
Tom Ogilvy



"Dan E" wrote in message
...
I would suggest putting the "Application.Visible = True" under the

userform
"Userform_Terminate" event.
ie.
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub

Excel wouldn't re_open using the first code, until I opened another
workbook.

Dan E

"Tom Ogilvy" wrote in message
...
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
Applicaton.Visible = True
End Sub

Might do something similar to what you want.

or

Private Sub workbook_open()
ThisWorkbook.Windows(1).Visible = False
start_screen.Show
ThisWorkbook.Windows(1).Visible = True
End Sub

Regards,
Tom Ogilvy


"Joe" wrote in message
...
I would like to minimize the current excel workbook when
the file is opened and only display a user form. The
problem is, when i do this the only way i can see the form
is to click on the minimized file. The code is simple but
the form will not popup on the screen. If this makes
sense does anyone have any suggestions? Here is the code
I am using.

Private Sub workbook_open()
Application.WindowState = xlMinimized
start_screen.Show
End Sub

Thanks in advance


Joe








Dan E[_2_]

window minimize
 
I actually thought your second approach was much better, then if you have
mutliple applications open, you can switch away from excel and back to it
using the taskbar as opposed to minimizing everything else. Nice work.

Dan E

"Tom Ogilvy" wrote in message
...
That may be a good approach, but worked fine for me as written. I have a
button on the userform that the user clicks to close the userform although
this could be done with application.OnTime.

Regards,
Tom Ogilvy



"Dan E" wrote in message
...
I would suggest putting the "Application.Visible = True" under the

userform
"Userform_Terminate" event.
ie.
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub

Excel wouldn't re_open using the first code, until I opened another
workbook.

Dan E

"Tom Ogilvy" wrote in message
...
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
Applicaton.Visible = True
End Sub

Might do something similar to what you want.

or

Private Sub workbook_open()
ThisWorkbook.Windows(1).Visible = False
start_screen.Show
ThisWorkbook.Windows(1).Visible = True
End Sub

Regards,
Tom Ogilvy


"Joe" wrote in message
...
I would like to minimize the current excel workbook when
the file is opened and only display a user form. The
problem is, when i do this the only way i can see the form
is to click on the minimized file. The code is simple but
the form will not popup on the screen. If this makes
sense does anyone have any suggestions? Here is the code
I am using.

Private Sub workbook_open()
Application.WindowState = xlMinimized
start_screen.Show
End Sub

Thanks in advance


Joe









steve

window minimize
 
Another approach is to make the form fit the full screen and hide the Excel
window.

Put this sub in the user form:

Private Sub UserForm_Initialize()
With Application
Me.Top = .Top - 10
Me.Left = .Left - 10
Me.Height = .Height - 10
Me.Width = .Width - 10
End With
End Sub

steve

"Dan E" wrote in message
...
I actually thought your second approach was much better, then if you have
mutliple applications open, you can switch away from excel and back to it
using the taskbar as opposed to minimizing everything else. Nice work.

Dan E

"Tom Ogilvy" wrote in message
...
That may be a good approach, but worked fine for me as written. I have

a
button on the userform that the user clicks to close the userform

although
this could be done with application.OnTime.

Regards,
Tom Ogilvy



"Dan E" wrote in message
...
I would suggest putting the "Application.Visible = True" under the

userform
"Userform_Terminate" event.
ie.
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub

Excel wouldn't re_open using the first code, until I opened another
workbook.

Dan E

"Tom Ogilvy" wrote in message
...
Private Sub workbook_open()
Application.Visible = False
start_screen.Show
Applicaton.Visible = True
End Sub

Might do something similar to what you want.

or

Private Sub workbook_open()
ThisWorkbook.Windows(1).Visible = False
start_screen.Show
ThisWorkbook.Windows(1).Visible = True
End Sub

Regards,
Tom Ogilvy


"Joe" wrote in message
...
I would like to minimize the current excel workbook when
the file is opened and only display a user form. The
problem is, when i do this the only way i can see the form
is to click on the minimized file. The code is simple but
the form will not popup on the screen. If this makes
sense does anyone have any suggestions? Here is the code
I am using.

Private Sub workbook_open()
Application.WindowState = xlMinimized
start_screen.Show
End Sub

Thanks in advance


Joe












All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com