473,221 Members | 1,722 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,221 software developers and data experts.

How do I gain control of an Excel Spreadsheet embedded in an Access form?

I have been working on an application that queries data from Access, loads
it into an array, and then writes it to an Excel spreadsheet. I use the
array approach to have fine control over spacing, formatting, etc. I have
gotten the first part of this to work by opening an Excel spreadsheet,
writhing the data, saving the spreadsheet and closing it. But what I would
like to do is to not actually open up Excel outside of Access. I want to
write the data to a spreadsheet embedded on the main form.

When the form runs, I can click on the spreadsheet and manually enter data,
but I cannot figure out what VBA commands to use to grab hold of the
spreadsheet. Can anyone point me in the right direction? Thanks.
Nov 12 '05 #1
2 7942
Use an unbound Frame control from the toolbox in a Form's design view.
You can embed an Excel spreadsheet in this control. Just follow the


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #2
"Rich P" <rp*****@aol.com> wrote in message
Use an unbound Frame control from the toolbox in a Form's design view.
You can embed an Excel spreadsheet in this control. Just follow the

Thanks. I have done that, but when I want to write the information to the
Excel spreadsheet, how do I do that? In regual Excel, I declare an object
variable and instantiate it. Then I query the Access database, load the
recordset into an array of customtype, and write the data to individual
cells in the ActiveWorksheet. For example:

For iCtr = 1 To UBound(FundPerfArray)
oXLWKS.Range("B" & N) = FundPerfArray(iCtr).strFund_Name
oXLWKS.Range("C" & N) = FundPerfArray(iCtr).str_Category
oXLWKS.Range("D" & N) = FundPerfArray(iCtr).strTicker
Next iCtr

This code writes to cells in the ActiveWorksheet. I want to do the same
thing with the spreadsheet embedded in the form so that the user has a
preview of what the final output will be and also will have the opportunity
to modify it. But I cannot seem to find how to access the Range property of
the embedded spreadsheet. The object inspector only shows properties such
as boderstyle, height, width, etc. Can't you use VBA to write to this
embedded sheet as opposed to only using it in an interactive fashion?
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
by: Martin | last post by:
There is an Access table on the network. 15 users who do not have Access are connected to the network. Is there a way for each user to be able to enter one or more rows containing 3 or 4 columns to...
by: jack | last post by:
Access is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it...
by: garry.oxnard | last post by:
Can anyone help me to solve a problem which involves switching from Access to Excel (then back to Access) programatically please? I have an Excel template which, on open, also opens an Access...
by: GH | last post by:
Does anyone know how I can access (using OleDbConnection, I presume) a spreadsheet embedded in a cell of another spreadsheet (with vb.net)? Thanks, GH
by: smaczylo | last post by:
Hello, I've recently been asked to work with Microsoft Access, and while I feel quite comfortable with Excel, I'm at a complete loss with databases. If someone could help me with this issue I'm...
by: semijoyful | last post by:
OS: Win XP SP2 Access version: 2003 Excel version: 2003 I am new at this, as I am sure you have gathered from this post title:) I am working on a form where users can input data in Access and...
by: slinky | last post by:
Can an Excel spreadsheet or a section of one be embedded into an Access form and serve as a subform from which other parts of the Access form can get data? Thanks!
by: Tony Hine | last post by:
Problem for Excel Developers One of the problems facing Excel developers moving into MS Access is actually the apparent similarity between MS Access tables and Excel spreadsheets. MS Access is...
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.