Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimize excel window

Status
Not open for further replies.

Enkay62

Programmer
Joined
Sep 5, 2003
Messages
78
Location
IT
Hi.
I noticed that methods related to windows size put in open event are run a few seconds after excel's window (normal size) has been shown.
I would like all windows(included excel main window) to be seen only when open event has been terminated.
What is the code and where do I have to write it to get to open an excel 2000 workbook with it's main window minimized?
I tried to solve my problem by changing window size on link properties screen, but it doesn't work.
Any suggestion will be appreciated.
Thank you in advance.
Merry Christmas.
Nick.
 
Does this help?....

Option Explicit

Dim Excel As Object
Dim ExcelSheet As Object

Private Sub Command1_Click()
Dim Name As String
Set Excel = CreateObject("Excel.Application")
Excel.Visible = True
Excel.WindowState = 2
Excel.Workbooks.Open App.Path + "\Test.xls"
Name = Excel.ActiveWorkbook.Sheets(1).Name
Set ExcelSheet = Excel.ActiveWorkbook.Sheets(Name)
End Sub

Merry Xmas!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top