473,804 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to write by VBA in an embedded xls-file?

Hi,

I want to show an excel-graphs in one of my access-forms.
The problem is how to refer to an embedded excel-file in my form.
I can refer to an external excelfile (see below) an do some test stuff
in this file but how can I do the same thing in an embedded Xls-file
like "Forms![frmTestForm]![OLEUnbound77]" ?

'open the workbook
Workbooks.Open filename:="C:\T est stuff\temp.xls"
'select sheet "Data"
ActiveWorkbook. Sheets("Data"). select
'select whole sheet
Cells.select
'Clear the sheet

Selection.Clear Contents
'For example, write "testing" in cell A1
Range("A1")= "testing"
'Save the workbook
ActiveWorkbook. Save
'and exit
ActiveWorkbook. Close

Replies please in this newsgroup
If you want to mail me:
Replace the nul in the adress by a zero.
Nov 13 '05 #1
1 1784
Ik wilde je er net op wijzen dat nul in het Engels zero is... eerst kijken!

How about using Microsoft Graph, available in reports for Access? Ah,
you ask for form functionality.

Apart from answers you get here, try an Excel group as well (don't
mention Access there ;-) )
You want to control Excel through its own VBA dialact, I am afraid.

veens-zevenhonderdvij f wrote:
Hi,

I want to show an excel-graphs in one of my access-forms.
The problem is how to refer to an embedded excel-file in my form.
I can refer to an external excelfile (see below) an do some test stuff
in this file but how can I do the same thing in an embedded Xls-file
like "Forms![frmTestForm]![OLEUnbound77]" ?

'open the workbook
Workbooks.Open filename:="C:\T est stuff\temp.xls"
'select sheet "Data"
ActiveWorkbook. Sheets("Data"). select
'select whole sheet
Cells.select
'Clear the sheet
Selection.Clear Contents
'For example, write "testing" in cell A1
Range("A1")= "testing"
'Save the workbook
ActiveWorkbook. Save
'and exit
ActiveWorkbook. Close

Replies please in this newsgroup
If you want to mail me:
Replace the nul in the adress by a zero.


--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
For human replies, replace the queue with a tea

Nov 13 '05 #2

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

Similar topics

3
12415
by: S.Byers | last post by:
I want to list *.CSV and *.XLS files in a drop down menu using dlgFileToImport.Filter = "CSV Files (*.csv)| *.csv" dlgFileToImport.Filter = "Excel Files (*.xls)| *.xls" dlgFileToImport.DefaultExt = ".csv" Please what is the syntax for ORing these two requirements. Many thanks - SB
1
2222
by: nickolausp | last post by:
When embedding a JavaScript document.write within a JavaScript document.write in Netscape 4.x (example below), the text is written out of logical order. <script type="text/javascript"> <!-- document.write('<script type=\"text/javascript\">document.write(\'111\');<\/script>222'); document.write('333'); //-->
0
1387
by: jpodesta | last post by:
Hello- I am fairly new to MS Access and would like to use some macros in .xls in an Access Module. I have tried to do this on my own but failed to make it work. I have included the xls macros and the module as well as where I would like the macros to run. Any input on how to make this work would be appreciated. This would automate a former 3 step process into one process. module
0
1750
by: jpodesta | last post by:
Hello- I am fairly new to MS Access and would like to use some macros in .xls in an Access Module. I have tried to do this on my own but failed to make it work. I have included the xls macros and the module as well as where I would like the macros to run. Any input on how to make this work would be appreciated. This would automate a former 3 step process into one process.
18
3717
by: jacob navia | last post by:
In C, we have read-only memory (const), read/write memory (normal data), and write only memory. Let's look at the third one in more detail. Write only memory is a piece of RAM that can only be written to, since its contents are undefined. The program is allocating a new piece of data, and the previous contents aren't relevant. This memory
2
12171
by: Jani Mantytorma | last post by:
I have embedded resource called Settings.xml. I'm able to read the resource but how can I write data to the resource. The code for read operation follows: private XmlDocument m_doc = new XmlDocument(); System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); System.IO.Stream stream = a.GetManifestResourceStream(this.GetType(),"Settings.xml"); if(!(null==stream)) { System.IO.StreamReader rdr = new...
7
1410
by: Solel Software | last post by:
Hi, I have an XLS that I am looking to open in a web form and grab it's information into a Dataset. I have been able to do so but am having trouble with Zip Codes. When the Zip Code column in the XLS is formatted as "Special--Zip Code" the ADO.NET provider interprets it as a floating point number for some reason (so the zip code 07039 is read as 7039.0). This occurs both with SQL Server 2000's DTS Import Wizard and ADO.NET from a web form....
0
910
by: SAL | last post by:
Has anyone created Embedded Links programmatically before? I have a VB.net and ASP.net Web Application developed in VS.net 2003. What I am trying to do/find is information on how to create an Embedded Link, where the link points to as particular document in our system (i.e. .doc, ..pdf, .xls, .tif, .jpeg, etc.) without actually giving the user login information. To clarify, the system is used by internal employee’s whom from time...
0
1526
by: sundowner225 | last post by:
Could someone help me with an output problem? I have an access database that I need to create some xls output from. Basically, I have three tables: Faculty_Table: Fields=ID,Name, Type, Degree, Additional Comments Courses_Table: Fields=ID, CourseName, CourseTitle, Section GradCourse_Table: Fields=ID, CourseName, CourseTitle, Institution
1
2002
by: Charlotte | last post by:
Hallo, Graag hulp, want ik heb zelf geen oplossing Al gegoogeld, doch zonder concreet resultaat Op onze webserver (intranet) hebben we een website draaien Een bepaalde ASP-pagina haalt zijn data uit een MDB De mdb wordt gevoed door andere asp-pagina's Tot hier geen probleem
0
9712
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9594
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10595
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9171
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7634
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5673
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.