首页 > 解决方案 > 运行时错误“-2147188160 (80048240)”:形状(未知数字):无效请求。剪贴板为空或包含可能无法在此处粘贴的数据

问题描述

我有一个 Excel 工作簿,我想使用 VBA 将 sheet1 中的表格导出到 PowerPoint。下面是我的代码,但我收到了错误消息作为磁贴。谁能帮我解决这个问题?

提前致谢。

Option Explicit
Sub Module1()

Dim ppApp As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide

Set ppApp = New PowerPoint.Application

ppApp.Visible = True
ppApp.Activate

Set ppPres = ppApp.Presentations.Add
Set ppSlide = ppPres.Slides.Add(1, ppLayoutBlank)
ppSlide.Select

Range("A1").CurrentRegion.Copy

ppSlide.Shapes.Paste

End Sub

标签: excelvbapowerpointclipboard

解决方案


推荐阅读