J
Jim Pockmire
I created a button on a form to open Excel using the wizard. How do I
specify Excel to open a particular path/file much like I would with a
command line argument? The wizard code is below, or do I need something
different?
Private Sub RunExcel_Click()
On Error GoTo Err_RunExcel_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
Exit_RunExcel_Click:
Exit Sub
Err_RunExcel_Click:
MsgBox Err.Description
Resume Exit_RunExcel_Click
End Sub
specify Excel to open a particular path/file much like I would with a
command line argument? The wizard code is below, or do I need something
different?
Private Sub RunExcel_Click()
On Error GoTo Err_RunExcel_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
'Only XL 97 supports UserControl Property
On Error Resume Next
oApp.UserControl = True
Exit_RunExcel_Click:
Exit Sub
Err_RunExcel_Click:
MsgBox Err.Description
Resume Exit_RunExcel_Click
End Sub