Solved

Editing an Excel Embedded Object in Powerpoint with VBA from Access

Posted on 2016-08-24
4
33 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 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

 Regular Expressions Microsoft Word has sophisticated search tools that can search for patterns. For example if you wanted to search for all UK phone numbers that followed a pattern of five digits, a space and then six digits you can easily do th…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

867 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

19 Experts available now in Live!

Get 1:1 Help Now