G
Guest
I am attempting to open an Excel spreadsheet from an Event procedure.
The code I am using seems to open the spreadsheet but only in the "back round"
How do I adjust my code to get it to open the Excel spredsheet so I can work
in EXCEL.
Code below:
Private Sub Command32_Click()
On Error GoTo Err_Command32_Click
Dim appExcel As Excel.Application
Dim wbExcelFile As Excel.Workbook
Set appExcel = CreateObject("Excel.Application")
Set wbExcelFile = appExcel.Workbooks.Open("C:\Analysis.xls")
wbExcelFile.Sheets("Sheet1").Activate
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub
The code I am using seems to open the spreadsheet but only in the "back round"
How do I adjust my code to get it to open the Excel spredsheet so I can work
in EXCEL.
Code below:
Private Sub Command32_Click()
On Error GoTo Err_Command32_Click
Dim appExcel As Excel.Application
Dim wbExcelFile As Excel.Workbook
Set appExcel = CreateObject("Excel.Application")
Set wbExcelFile = appExcel.Workbooks.Open("C:\Analysis.xls")
wbExcelFile.Sheets("Sheet1").Activate
Exit_Command32_Click:
Exit Sub
Err_Command32_Click:
MsgBox Err.Description
Resume Exit_Command32_Click
End Sub