473,403 Members | 2,366 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,403 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 8061
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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,...
0
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...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...
0
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...

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.