Guys
Having a Powerpoint Presentation with a pasted special excel link. I can see my data from the Excel file, I can change my data in the Excel file, but I don't see the data change in the Powerpoint unless I close the presentation and reopen it.
The presentation sits on a PC in the workshop and runs 24-7, is there any VBA written to dynamically refresh the data on the presentation that anyone knows of?
Thanks
Refresh Data
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Refresh Data
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 12604
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Refresh Data
This looks like it should work...
https://stackoverflow.com/questions/181 ... slide-show
https://stackoverflow.com/questions/181 ... slide-show
StuartR
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Refresh Data
Great find Stuart, I think I understand it.
Would you know if the script would need an event to fire it, such as a timer event or something?
Would you know if the script would need an event to fire it, such as a timer event or something?
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78465
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Refresh Data
You'd have to run the InitializeApp macro once after opening the presentation. I think that would be enough to get the code running.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Refresh Data
Ok I don't understand properly.
Created a class module (Class 1)
In (General) (Declarations) added:
Then created a module (Module 1)
And in (Geberal) (Declarations) added:
Should this work when starting the presentation?
Created a class module (Class 1)
In (General) (Declarations) added:
Code: Select all
Public WithEvents app As Application
Private Sub App_SlideShowNextSlide(ByVal Wn As SlideShowWindow)
ActivePresentation.Slides(3).Shapes(1).LinkFormat.Update
End Sub
And in (Geberal) (Declarations) added:
Code: Select all
Dim x As New Application
Sub initialiseapp()
Set x.app = Application
End Sub
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78465
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Refresh Data
After opening the presentation, press Alt+F8, select initializeapp and click Run.
Then start the slideshow.
Then start the slideshow.
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Refresh Data
Hmm Interesting. I have method or data not found, but at least something is happening:
You do not have the required permissions to view the files attached to this post.
Cheers ...
Dave.
Dave.
-
- Administrator
- Posts: 78465
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Refresh Data
Oh wait. Change the line
to
where Class1 is the name of the class module that you created.
Code: Select all
Dim x As New Application
Code: Select all
Dim x As New Class1
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: Refresh Data
Thanks Hans, we're all there nearly. Just have to reference the correct shape index and done.
Thanks Again
Thanks Again
Cheers ...
Dave.
Dave.