Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel 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 November 23rd, 2004, 12:39 PM
Authorized User
 
Join Date: May 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default inserting worksheet into an OLE field with VBA

Dear all,

I'm trying to embed an Excel worksheet into an Access database in an OLE field. The operation is generated in the Excel workbook, through VBA. I have set up an ADODB connection to the database, but I don't know how to handle OLE fields. Can anyone, please tell me how to insert the worksheet?
And how to extract, afterwards, the worksheet from OLE field?

Would linking be a better solution?

Thanx,
Mihai

 
Old January 21st, 2005, 06:22 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 180
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have found that when using excel and access I always get problems with formatting of text strings and numbers, but that is my problem, however for this solution I would recommend the use of a linked xls file into access, any changes made in the spread are, naturally, reflected in the database. Once the link is active you have a variety of options.

1 use buttons and other control objects to execute MSQuery in excel that passes through statements into Access. My preferred option.
2 use automation from within Excel to control Access.

Tell me which you would prefer to use and I would be pleased to offer any assistance.

cheers

Matthew

 
Old January 21st, 2005, 06:50 AM
Authorized User
 
Join Date: May 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Matthew,

thanks for the suggestions. Indeed, I use one of the options (the second one) and collect all the relevant data (financial data) from the Excel files into an Access database.
And I have indeed some problems with format of the data (there are different regional settings for each user).

But my real problem is that I want to keep an entire spreadsheet into the database (it's an evaluation report written by a financial analyst, which don't have a standard layout). So I was thinking about using an OLE field; but I don't know how to handle this with VBA.
Can you give me a clue?

Mihai






Similar Threads
Thread Thread Starter Forum Replies Last Post
Translating WorkSheet Formula in VBA AndyL Beginning VB 6 2 June 11th, 2008 04:13 AM
Double-click on OLE field - SOLVED Tachyophan Access 0 August 16th, 2006 03:06 AM
Importing a bitmap to an ole field rohan_man Access 6 February 13th, 2005 11:57 PM
Inserting worksheet into OLE field Mihai B Access 0 November 24th, 2004 07:39 AM
inserting worksheet into an OLE field with VBA Mihai B Access VBA 0 November 23rd, 2004 10:28 AM





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