简体   繁体   English

从 PowerPoint 演示文稿(VBA、powerpoint)打开 Excel 文档

[英]Open Excel document from a powerpoint presentation (VBA, powerpoint)

I want to open an existing excel document in the same directory with an ActiveX button during my presentation.我想在演示过程中使用 ActiveX 按钮在同一目录中打开现有的 excel 文档。 The code编码

Workbook.Open "Dokumention.xlsx"

doesn't work.不起作用。

You need to set the object first.您需要先设置对象。

Dim xExcelApp As Excel.Application
Set xExcelApp = CreateObject("Excel.Application")
xExcelApp.Visible = True
Set wb = xExcelApp.Workbooks.Open("SOMEPATH\Dokumention.xlsx")

Before you run it you need to enable the reference MS Excel 16.0 Object Library在运行它之前,您需要启用参考 MS Excel 16.0 对象库在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM