简体   繁体   中英

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. 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在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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