Automation Problems in 2002 Dev Edition
Hi
I have posted this to the Access VBA but without result. It does I think come under the header of Automation in that it deals with creating an excel object within Access 2002 Developer Edition
Hi
I have used the developer edition a few times to provide a simple database with the run time files where the client did not have a copy of MSOffice.
I have not ever had to provide an Access database with the ability to use Excel as well as Access under similar circumstance. Recently I had such a request.
I am having difficulty in achieving this....To indicate my level of skill with the run time file side of Access 2002 Deveoper I know how to use the packaging wizard....Well I thought I knew
Heres what I have done to date
Created the Dabatase. Created a Blank .xls workbook.
When using the wizard I included the XL DLL (Having found its locations by going into references in the VBA editor
I also included the Blank .xls WorkBook
Lastly I placed a command button on one of the forms in the dbase with the following code attached to the click event. The syntax is I think what is called late binding and is appropriate to that which I am trying to achieve (allegedly)
Private Sub CmdOpenXLApp_Click()
On Error GoTo Err_CmdOpenXLApp_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
On Error Resume Next
oApp.UserControl = True
Exit_CmdOpenXLApp_Click:
Exit Sub
Err_CmdOpenXLApp_Click:
MsgBox Err.Description
Resume Exit_CmdOpenXLApp_Click
End Sub
When I take the output from the packaging wizard and load it on to a PC (Without MSoffice)the Access dbase works but clicking the command button does not open excel to manipulate the xlsWorkbook
Advice appreciated
MF
|