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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximise Excel Code

Status
Not open for further replies.

4pbn

Technical User
Oct 11, 2002
4
NZ
Hi all, what is the code that will maximise an Excel Form when the Command Button is clicked. My code is shown below:

Private Sub Command1_Click()
Dim xlApp As Excel.Application

Set xlApp = New Excel.Application
Workbooks.Open FileName:="C:\Forms\Forms.xls"
Workbooks.Application.Visible = True

End Sub

Thanks for your help.
 
Hi, I think you could use the following code

xlApp.Windows("Forms.xls").wWindowState = xlMaximized

I've written "Forms.xls", but it is the caption of your form

Hope this could help you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top