W
Wayne Rouse
Hi,
I am sure someone else has run into a similar issue so I
thought I might ask for some advice. Below is a code
snipet. I am trying to make sure when my VB app opens
excel that it always opens EXCEL maximized. I need this
to happen from the VB side and not from an embedded vba
macro in the spreadsheet.
***********************************************
Private Sub OpenExcel()
Dim msExcelApp As Object
Dim msExcelMacro As Object
'Set the object
Set msExcelApp = GetObject("", "Excel.Application")
Set msExcelApp = GetObject("", "Excel.Application")
'Next parameter will be looked up from a database
instead of static
gsTemplateName = "D:\Projects\example.xls"
With msExcelApp
.Visible = True
.workbooks.Open (gsTemplateName)
'.WindowState = xlMaximized
End With
End Sub
************************************
I get an error trying to set my objects WindowState.
Any help would be appreciated.
Thanks,
Wayne
I am sure someone else has run into a similar issue so I
thought I might ask for some advice. Below is a code
snipet. I am trying to make sure when my VB app opens
excel that it always opens EXCEL maximized. I need this
to happen from the VB side and not from an embedded vba
macro in the spreadsheet.
***********************************************
Private Sub OpenExcel()
Dim msExcelApp As Object
Dim msExcelMacro As Object
'Set the object
Set msExcelApp = GetObject("", "Excel.Application")
Set msExcelApp = GetObject("", "Excel.Application")
'Next parameter will be looked up from a database
instead of static
gsTemplateName = "D:\Projects\example.xls"
With msExcelApp
.Visible = True
.workbooks.Open (gsTemplateName)
'.WindowState = xlMaximized
End With
End Sub
************************************
I get an error trying to set my objects WindowState.
Any help would be appreciated.
Thanks,
Wayne