Solved

Editing an Excel Embedded Object in Powerpoint with VBA from Access

Posted on 2016-08-24
4
30 Views
Last Modified: 2016-09-26
I have a whole process that updates various objects in Powerpoint using data and an Access module.

I have successfully updated chart data, text boxes and tables. The issue lies with an embedded Excel spreadsheet. I need to update the data in the Excel embedded spreadsheet but for some reason it is not updating the data.

The portion of my code that is supposed to update the Excel is this...
                    With currentSlide.Shapes(strObj).OLEFormat.Object
                       .Activate
                       .Worksheets(1).Range("J11").Value = "50"

It doesn't error out but it does not actually update the cell value (previously in the code the PowerPoint file is opened and moved to the correct slide (currentSlide is the variable that references this and strObj is the variable that is feeding in the name of the object to be updated). It works well every where else that I am updating something.

Do I have to use something other than activate? Is there an update method or something that I have to use?

Any help would be greatly appreciate.
0
Comment
Question by:Margaret Castellanos
  • 2
4 Comments
 
LVL 19

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 500 total points
ID: 41770306
I believe the range reference may be wrong.  What is the cell address you are trying to update?

you can also reference a cell with
.cells(nRow, nCol)

Open in new window

I(t would be helpful is you post the rest of the procedure, thanks
0
 

Accepted Solution

by:
Margaret Castellanos earned 0 total points
ID: 41770448
Thanks Crystal -- actually it is a range and that is the correct formatting for a range (col, row). You are correct if it was a cell it would then be (row, col).

I was able to get the code to work exactly as written. There was a hidden worksheet and the code was updating the hidden worksheet which would be 1 -- once I pointed it the correct worksheet it worked beautifully.

:D
0
 
LVL 19
ID: 41770548
> "a hidden worksheet"

aah! Glad you figured that you. I generally use Worksheets("SheetName") as opposed to number referencing so it is clear which sheet it is ;) ~

btw, the J didn't look like a J with the screen font ... looked more like a weird bracket ... now I see the range reference is just fine
0
 
LVL 13

Expert Comment

by:frankhelk
ID: 41815701
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Margaret Castellanos (https:#a41770448)
-- crystal (strive4peace) - Microsoft MVP Access (https:#a41770306)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

frankhelk
Experts-Exchange Cleanup Volunteer
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
Introduction In all recent versions of PowerPoint it is possible to trigger animations. This means the animation takes place when a certain shape is clicked. This allows you to run animation “on demand” and outwith the normal sequence of mouse cl…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now