MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Is there way to minimize the excel window?

  Asked By: Waldemar    Date: Oct 27    Category: MS Office    Views: 1502

I wrote the form to automatically kick off when the xls is opened but is
there anyway to minimize the spreadsheet automatically so that it doesn't
show up on the form's back ground?



2 Answers Found

Answer #1    Answered By: Jawwad Akram     Answered On: Oct 27

You can use Application.Visible = False to hide Excel. Here is an example, in
the UserForm_Activate event of the form:

Private Sub UserForm_Activate()
'Hide Excel when this form  is activated
Application.Visible = False
End Sub

Use Application.Visible = True to make Excel visible again. Here is an example,
in the code attached to a "Close form" button on a userform:

Private Sub cmdExit_Click()
Unload Me
Application.Visible = True
End Sub

Answer #2    Answered By: Shirley Allen     Answered On: Oct 27

Or, use: Windows(1).WindowState = xlMinimized
in either ThisWorkbook in the automatically-open part of the code,
or the userform code.

You may need to change the "Windows(1)" part to fit your situation,
since the window  a user may be using may not be the first one
running on Excel.

And, remember to open it again with something like: Windows
(1).WindowState = xlMaximized if you need the spreadsheet  needs to
be viewed later.

Didn't find what you were looking for? Find more on Is there way to minimize the excel window? Or get search suggestion and latest updates.