【问题标题】:Editing embedded objects in powerpoint在 PowerPoint 中编辑嵌入对象
【发布时间】:2010-12-25 04:32:10
【问题描述】:

我有一个幻灯片演示文稿,其中一张幻灯片中嵌入了一个 Excel 工作簿。我还有一个用户表单,我希望用户输入信息,我想获取这些信息,然后使用相关信息编辑 Excel 工作表。

我不知道如何在 powerpoint 中访问 excel 表,所以我可以更改单元格的值。

【问题讨论】:

    标签: vba excel powerpoint


    【解决方案1】:
    Sub a()
    
    Dim oSl As PowerPoint.Slide
    Dim oSh As PowerPoint.Shape
    
    Set oSl = ActivePresentation.Slides(1)
    
    Set oSh = oSl.Shapes(1)
    
    With oSh.OLEFormat.Object.Sheets(1)
        .Range("A1").Value = .Range("A1").Value + 1
        .Range("A2").Value = .Range("A2").Value - 1
    End With
    
    Set oSl = Nothing
    Set oSh = Nothing
    
    End Sub  
    

    灵感来自this code

    【讨论】:

    • 我查看了几种嵌入在 Excel 中的 ppt 解决方案,但都未能成功。没有帮助。
    • @Mike 好的。我会尝试将这些东西放在一起并编辑答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-20
    • 1970-01-01
    • 2019-10-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多