Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3065
  • Last Modified:

Import Excel chart (or image of chart) into Access

Experts,

As anyone who uses Access knows the charts are pretty bad compared to what you can do in Excel. I've got a really nice chart built in Access that is linked to a query in my Access file.  Is it possible to import the chart from Excel back into Access? If not, how about importing or linking to it as an image?

Thanks, Dale
0
Dale Logan
Asked:
Dale Logan
  • 3
  • 3
2 Solutions
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
No, you cannot import an Excel chart into Access.

You could use an Unbound OLE Object control on a form to show that chart. Just drop the control on the form and set the Object to your Excel workbook.

If you just want an image, then take a screenshot of the image and use the Image control to show that picture. If the image changes frequently, or if it needs to be dependent on the data in the form, then this may not be the best way to handle your issue, however.
0
 
Dale LoganConsultantAuthor Commented:
Scott,

I've never used an unbound OLE Object control but was able to get this one to work. Maybe this should be a new question, but is there anyway to have the data used for the chart in Excel auto refresh?
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
It should refresh every time you reload it, assuming your Excel sheet does so. Essentially, the OLE Object control just shows the object (in this case, and Excel file) as it would in the native environment (in this case, Excel).

Or do you mean something else?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Dale LoganConsultantAuthor Commented:
I will give it a try. Just "assumed without trying" it would need to be refreshed using VBA. The source is actually in the Access file where I am showing the chart. Just needed a much better chart than Access offers.
0
 
Dale LoganConsultantAuthor Commented:
I have the data connection in Excel set to refresh when the file is opened. So, refreshing the control in Access simply shows the chart as it were the last time the Excel file was saved.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You'd have to automate Excel to do this, if you need to open and then save the file. Without going into too many specifics:

Dim xl As Object
Set xl = CreateObject("Excel.Application")
xl.visible = False
xl.Workbooks.OPen "Full path to your xls file"

xl.Visible = False
xl.Workbooks.Open ""
xl.Workbooks(0).Save
xl.Quit

Set xl = Nothing

Open in new window


Do something like that just before you open the Access form.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now