Ojbet Excel dans powerpoint

Résolu
pmarnay Messages postés 2 Date d'inscription mardi 7 juin 2005 Statut Membre Dernière intervention 22 novembre 2006 - 22 nov. 2006 à 15:27
pmarnay Messages postés 2 Date d'inscription mardi 7 juin 2005 Statut Membre Dernière intervention 22 novembre 2006 - 22 nov. 2006 à 20:11
Bonjour,

Quelqu'un sait-il comment piloter en VBA un objet Excel inséré dans un powerpoint ?
(p.ex écrire "bonjour!" dans le cellule (2,3) de l'objet )
Par avance, merci

3 réponses

michelxld Messages postés 402 Date d'inscription vendredi 6 août 2004 Statut Membre Dernière intervention 12 octobre 2008 32
22 nov. 2006 à 18:19
bonsoir

tu peux essayer d'adapter ce type de procedure:

Dim pwrPoint As PowerPoint.Application
Dim Prez As PowerPoint.Presentation
Dim Forme As PowerPoint.Shape
Dim Presentation As String
Dim Wb As Object


Presentation = "C:\MaPresentation.ppt"


Set pwrPoint = CreateObject("PowerPoint.Application")
pwrPoint.Visible = msoTrue
Set Prez = pwrPoint.presentations.Open(Presentation)


    For Each Forme In Prez.Slides(1).Shapes
        If Forme.Type = msoEmbeddedOLEObject Then
        'ou
        'If Forme.Type = msoLinkedOLEObject Then
            If Forme.OLEFormat.progID = "Excel.Sheet.8" Then


                Set Wb = Forme.OLEFormat.Object
                Wb.Worksheets("Feuil1").Cells(2, 3) = "Bonjour"
               
                Exit For
            End If
        End If
    Next

michel
3
jrivet Messages postés 7392 Date d'inscription mercredi 23 avril 2003 Statut Membre Dernière intervention 6 avril 2012 60
22 nov. 2006 à 16:00
Salut,
De quelle manière est inséré l'objet Excel dans PowerPoint?

@+: Ju£i?n
Pensez: Réponse acceptée
0
pmarnay Messages postés 2 Date d'inscription mardi 7 juin 2005 Statut Membre Dernière intervention 22 novembre 2006
22 nov. 2006 à 20:11
Merci c'est exactement ce que je cherchais !!
0
Rejoignez-nous