Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 9th, 2008, 10:40 AM
Authorized User
 
Join Date: Jun 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access 2002 Developer Edition

Hi

I have used the devloper 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 and the ability to use Excel. Recently I had such a request.

I am having difficulty in achieving this....To indicate my level of skill I know how to use the packaging wizard...end of story.

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
    'Only XL 97 supports UserControl Property
    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) it does run the Access dbase but clicking the command button does not open excel to manipulate the xlsWorkbook

Advice appreciated

MF


 
Old May 12th, 2008, 06:55 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

I think this line is causing the trouble:

Set oApp = CreateObject("Excel.Application")

Why don't you use a .csv file instead, and set it up like Excel. Then if someone wants to use Excel, it will open the file with no problem.

I don't think you can develop the entire application using Office file formats and not have Office installed.

mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report 8.0 Developer Edition besharam Crystal Reports 0 August 25th, 2007 04:56 AM
Developer Edition - OS Support Vente SQL Server 2000 2 April 13th, 2004 08:17 AM
SQL Server Developer Edition Ben SQL Server 2000 3 March 14th, 2004 07:05 AM
SQL Server developer edition shahchi1 SQL Server 2000 1 January 12th, 2004 04:06 PM
SQL Server developer edition shahchi1 Classic ASP Databases 0 January 7th, 2004 12:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.