473,387 Members | 1,561 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,387 software developers and data experts.

Excel Chart Object In Access Report.

I've tried numerous times to get Excel to recognise the Excel Chart Object inserted into an Access Report. No Luck.

I can get Access to start an instance of Excel, I can get Access to send the data to Excel. How do I get Excel to now Recognise the Chart object, so I can use Automation to change the features of the chart?
Aug 6 '07 #1
3 8059
MikeTheBike
639 Expert 512MB
I've tried numerous times to get Excel to recognise the Excel Chart Object inserted into an Access Report. No Luck.

I can get Access to start an instance of Excel, I can get Access to send the data to Excel. How do I get Excel to now Recognise the Chart object, so I can use Automation to change the features of the chart?
Hi

You could try recording a macro in Excel changing the features you require, and then transfer the code to Access, with the necessary mods, ie. all ojects to be references via the Excel instance in access etc. ?


MTB
Aug 6 '07 #2
FishVal
2,653 Expert 2GB
I've tried numerous times to get Excel to recognise the Excel Chart Object inserted into an Access Report. No Luck.

I can get Access to start an instance of Excel, I can get Access to send the data to Excel. How do I get Excel to now Recognise the Chart object, so I can use Automation to change the features of the chart?
Hi.

I suppose you'll not succed this way bkz Access (my somewhat speculative presumption) does not load object to report object frame control.
Expression in report module like Me.OLE1.Object fails with error message smthng like "Object does not exist".
Moreover, if you place OLE object to a form and then place the form to a report within SubForm control, then any attempt to access subform form object will fail.

My very speculative guess is that access supposes that reports should not contain dynamic objects. It calls correspondent object once to generate picture which is rendered to report page.
Aug 6 '07 #3
MikeTheBike
639 Expert 512MB
Hi

Without knowing precisley what you are trying to do but I assume you are coding all this in Access, as you said, using automation. If so then this code returns info from Chart object and resizes it.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdTestChart_Click()
  2.     Dim oExcel As Excel.Application
  3.  
  4.     Set oExcel = CreateObject("Excel.application")
  5.  
  6.     oExcel.Workbooks.Open ("H:\DBForum\Example Database Code etc\TestChart.xls")
  7.  
  8.     Dim chrt As Excel.ChartObject
  9.  
  10.     With oExcel.ActiveSheet
  11.  
  12.         For Each chrt In .ChartObjects
  13.             MsgBox chrt.Name
  14.             .Shapes(chrt.Name).ScaleWidth 1.5, msoFalse, msoScaleFromTopLeft
  15.             .Shapes(chrt.Name).ScaleHeight 1.59, msoFalse, msoScaleFromTopLeft
  16.         Next
  17.     End With
  18.     oExcel.Visible = True
  19. End Sub
HTH

MTB

ps. you also need a reference to the Microsoft Office Object Library
Aug 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

13
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...
0
by: Dave Stone | last post by:
I have a chart in an Excel worksheet which I want to appear in an Access report. The report has an OLEUnbound object which is where I want the chart to appear. The snag is that it needs to be done...
1
by: Megan | last post by:
Hi- I was wondering if it is possible to code a macro to: 1. retrieve a bunch or records 2. output them to an excel file 3. have excel start up 4. process the data received from access 5....
14
by: pmud | last post by:
Hi, I need to use an Excel Sheet in ASP.NET application so that the users can enter (copy, paste ) large number of rows in this Excel Sheet. Also, Whatever the USER ENETRS needs to go to the...
1
by: Robin Tucker | last post by:
Heres and interesting problem: I have a VB.NET program that creates reports via. Word Automation. This all works fine. What I want to do as part of this report generation process is to embed a...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
6
by: Thelma Lubkin | last post by:
I am trying to modify an Access form that allows a user to specify the information s/he needs from a census-type database. The form's code builds a SQL statement from the user's request, and...
3
by: hayuti | last post by:
Hi there This Question was posted on a wrong site. Just as introduction I am working in Access VBA where I coded a routine to retrive data from Access Database, exporting it on to Excel file...
0
by: AlexNunley | last post by:
I am trying to dump data from an access query into excel so I can pretify it. I found sample code from an old access 97 book (The version of access in use)and tinkered it into working. Well sort...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.