Programmatically copying from MSGraph Datasheet to another

B

Barb Reinhardt

I'd like to programmatically copy data from one MSGraph datasheet in one
presentation to another MSGraph datasheet in another presentation. Can
someone direct me to some code snippet that I could try?

Thanks,
Barb Reinhardt
 
A

Andy Pope

Hi,

This takes the data from a graph on slide 1 and copies it to a graph on
slide 2.
Notice the top left cell on the data sheet is referenced using 00

'------------------------
Sub TransferData()
'
' Adjust references to slides and
' objects to suit your presentation
'
Dim grpDS_1 As Object
Dim grpDS_2 As Object

Set grpDS_1 = _
ActivePresentation.Slides(1).Shapes(3).OLEFormat.Object.Application.datasheet
Set grpDS_2 = _
ActivePresentation.Slides(2).Shapes(2).OLEFormat.Object.Application.datasheet

grpDS_1.Range("00:D5").Copy
With grpDS_2
.Range("00").Paste
.Parent.Update
.Parent.Quit
End With

End Sub
'------------------------

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top