Hi everyone,
I have a question about command Shell. I have a command button on an Access 2003 form. The code on the on click event works but Excel does not open maximized. I only get a excel icon on the toolbar showing Excel is open. When I click the toolbar icon, the correct Excel file is there. Is there a way to have the Excel form open maximized?
I have a question about command Shell. I have a command button on an Access 2003 form. The code on the on click event works but Excel does not open maximized. I only get a excel icon on the toolbar showing Excel is open. When I click the toolbar icon, the correct Excel file is there. Is there a way to have the Excel form open maximized?
Code:
Private Sub cmdOpenExcel_Click()
On Error GoTo Err_cmdOpenExcel_Click
Dim retVal As Variant
retVal = Shell("Excel " & Chr(34) & "\\bigguy\users\dom_f\Access\TestWebPAS2\TESTwebpas_download.xls" & Chr(34))
Exit_cmdOpenExcel_Click:
Exit Sub
Err_cmdOpenExcel_Click:
MsgBox Err.Description
Resume Exit_cmdOpenExcel_Click
End Sub