473,748 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to connect Access, Excel & Powerpoint

doma23
107 New Member
Currently I'm working on development of an access application that deals with some fiancial data.

I need a button on access form that will when clicked open powerpoint file and create and insert all the graphs from the underlying access data.

This is what I've done so far:
I've created a macro that extract necessary access data from a predefined query and converts it to xls. Then I've made the second xls file that extracts the data from the first xls file, and I've added graph to that second xls based on those extracted data. If I've added the graph to the first xls file it would be overwrited and erased each time the button is clicked.
Furthermore, I've created a ppt file that extract graph from the second xls file.
After creating all that, I've added VBA code to be evoked on the click of the button on my form. VBA code first run macro, and therefore creates first xls file, and after that it calls sub which opens ppt file that I've created previously.

Here are the problems. After macro creates the first xls file, the second xls file is not updated, i guess both xls files need to be opened at the same time for the second xls file to show updated datas. Obviously ppt file is also showing unupdated informations.
The second thing is that I also don't want Powerpoint to ask user if he wants to update all the graphs, but to do it automatically for him. This is not an issue now, but may occur on some instances.

And since there will be lot of graphs, there is a third thing that I don't know how to do, but would like to implement. I want all the necessary access data to be extracted to one xls file, on different worksheets, so each graph would have it's own worksheet in the same xls file.

I somehow feel that there should be much simpler solution, but I can't find it yet.
Hope I was clear and that somebody will be able to help.

Thank you in advance!
May 25 '10 #1
6 6201
NeoPa
32,571 Recognized Expert Moderator MVP
Are you using Application Automation for this Doma?

Are you using DoCmd.TransferS preadsheet() to pass the data to Excel in the first place?
May 25 '10 #2
doma23
107 New Member
From this what I've read regarding Application Automation I believe I am. This is the sub which I'm calling to open ppt file:

Expand|Select|Wrap|Line Numbers
  1. Sub PPT_OPEN()
  2.  
  3. ' Create powerpoint page
  4.     Dim pptPres As PowerPoint.Presentation
  5.     Dim pptApp As PowerPoint.Application
  6.     Dim pptSlide As PowerPoint.Slide
  7.     Dim file As String
  8.     file = "C:\access\test_v1.ppt"
  9.  
  10.     Set pptApp = CreateObject("PowerPoint.Application")
  11.     pptApp.Visible = True
  12.     Set pptPres = pptApp.Presentations.Open(file)
  13.  
  14. End Sub
As for the code you've mentioned DoCmd.TransferS preadsheet() , I'm not using it.
This is the code behind the button click:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdRunPpt_Click()
  2. DoCmd.RunMacro "EXPORT_ROAC"
  3. Call PPT_OPEN
  4. End Sub
And this is basically the code of the macro (transformed to VBA):
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acQuery, "ROAC_Q", "MicrosoftExcelBiff8(*.xls)", "C:\ACCESS\DATA\ROAC.XLS", False, "", 0
May 25 '10 #3
doma23
107 New Member
Ok. Here comes the update.
I completely removed the second xls file as it's not really needed as I now figured how to extract data to a particular worksheet. By doing this I kind of a solved the update problem in ppt (when there are multiple xls fles connected).
I deleted the macro that was used for creation of xls file and have put the vba code instead.
The vba code is using DoCmd.TransferS preadsheet and it's placing data in a particular worksheet of xls file.

After that I've created needed graphs in xls file and just copied them to the ppt file.
They are linked to xls through datasheet in ppt. I'm not sure how good this solution is, as it will probably increase the size of ppt file, as the data now exist on 2 places (xls and ppt). Or, maybe I'm wrong?

Still need to do some testing tomorrow to see how it will all look when connected together.
I think this should work out fine in the end, but the only thing that is still bothering me is how to update ppt automatically when opened, without asking user if he/she wants to update the data.
May 25 '10 #4
NeoPa
32,571 Recognized Expert Moderator MVP
Well, you've already discovered for yourself most of what I could have suggested. Well done. You also answered my questions intelligently and I think that helped (as indeed I had hoped).

The only issue I would comment on is that I would expect you could use Application Automation again to open the PPT document in PowerPoint and respond, as the user, to the update prompt. I'm not sure how that would work as I don't use PowerPoint except when I'm sent presentations, but from your earlier responses I expect just a pointer in the right direction will be enough to allow you to discover the full solution.

Welcome to Bytes!
May 25 '10 #5
doma23
107 New Member
@NeoPa
Thank you, you for sure helped!
May 26 '10 #6
NeoPa
32,571 Recognized Expert Moderator MVP
Very pleased to hear that Doma :)

It's a pleasure dealing with someone who needs so little in the way of direction.
May 26 '10 #7

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

Similar topics

11
4054
by: Mr. Smith | last post by:
Hello all, My code can successfully open, write to, format and save several worksheets in a workbook then save it by a given name, close and quit excel. My problem is that if I try and do it again, Excel hangs. OR if I open Excel again (say from a desktop icon) before I close Access, Excel hangs. (this has happened for both 97 & 2000 for me) I of course thought that I mustn't be unloading a variable properly.
2
1471
by: bart van deun | last post by:
Hi everybody, Can someone tell me what are the possibilities for connecting Access to the web? Something like thirt party software to do that? Thank you, Someone from Belgium - Europe
10
15782
by: John Smith | last post by:
Is there anyway to convert/export/copy an Access report into a Powerpoint slide? I know I can publish via Excel/Word but these remove formatting etc and therefore always require some degree of manipulation. My report data obviously changes from time to time and I want to avoid having to reformat/update manually. Thanks
1
11658
by: tkaleb | last post by:
I have to create output file in a text, MS Access, MS Excel and .dbf format from C# Win/ADO.NET application. Data are collected in DataSet and there is no problem to make text file. However, I have to create a new output files (tables with defined fields) in other 3 formats, and to fill them with data from DataSet. I created Excel output with ComponentOne's trial Excel component, but it is a temporary solution. Also I have unusual CP (1250...
3
10748
by: James Wong | last post by:
Dear all, I have an old VB6 application which can create and access Excel object. The basic definition statements are as follows: Dim appExcel As Object Dim wkb1 As Excel.Workbook Dim wks1 As Excel.Worksheet Set appExcel = New
14
1834
by: johnvon | last post by:
Can it be done, and if so, how? Thanks! John
1
2140
by: PengYu.UT | last post by:
There has been some lengthy discussion on pros and cons of Word and Latex on the web. But for drawing figure there are also two set of packages metapost and powerpoint(visio). I don't see much discuss on the advantages and disadvantages of them. Although I'm a fan of latex and metapost. I'm urged to switch from metapost to powerpoint for drawing pictures (mainly for acadamic papers) by somebody. Their claim is that pictures in...
0
4058
by: Rob | last post by:
Hey folks, my mind is turning into mush... I created a report tracking program in access that works beyond my greatest expectations. So of course, I am constantly adding features to make life easier for my users (and harder for myself). Every week my secretary exports different sets of data into Excel (via cmd buttons on form) then copies and pastes the data into powerpoint slides for our weekly staff meeting. I want to simplify this...
0
1542
by: Nadirsha Muhammed | last post by:
How to access excel function wizard through C#
3
1879
by: mehdi4467 | last post by:
Hi, I am trying to connecting Access DataBase to C#, my data base hase 3 table. in c# when I configure data adapter and run SELECT account.* FROM account query, there is no problem and application run correctly. but when I trying to use 2 or 3 table from this data base SELECT account.ID, account.name, account.family, fish.bankname AS Expr2, fish.accountid, fish.fishid, bank.banknumber AS Expr3, ...
0
8831
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
9548
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...
1
9325
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9249
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8244
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...
0
6076
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
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.