Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 9th, 2008, 10:40 AM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
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


Reply With Quote
  #2 (permalink)  
Old May 12th, 2008, 06:55 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 05:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.