Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Editing an Excel Embedded Object in Powerpoint with VBA from Access

Posted on 2016-08-24
4
Medium Priority
?
126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Assisted Solution

by:crystal (strive4peace) - Microsoft MVP, Access
crystal (strive4peace) - Microsoft MVP, Access earned 2000 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 22
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 14

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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

610 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