Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2349|回复: 4

总是有这样那样的错误,请大师给个能正确执行的版本——关于ppt控件控制excel表数据

[复制链接]
发表于 2014-4-25 22:34 | 显示全部楼层 |阅读模式
点击ppt456中窗体,使excel表123的sheet2中第二行复制到sheet1第二行?

123.rar

33.49 KB, 下载次数: 12

发表于 2014-4-25 22:56 | 显示全部楼层
EXCEL的VBA都没有学好,PPT中的VBA不会,等着看高人的答案
回复

使用道具 举报

发表于 2014-4-25 22:57 | 显示全部楼层
VBA跳出Excel,咱就不会了,跟帖子方便学习!
回复

使用道具 举报

发表于 2014-4-25 23:07 | 显示全部楼层
在PPT中操作EXCEL么?
回复

使用道具 举报

发表于 2014-4-25 23:26 | 显示全部楼层
  1. Private Sub CommandButton1_Click()
  2.     Dim xls As Object
  3.     Set xls = CreateObject("excel.application")
  4.     With xls
  5.         .DisplayAlerts = False
  6.         With GetObject(ActivePresentation.Path & "\123.xlsx")
  7.             .worksheets("sheet2").Rows(2).Copy .worksheets("sheet1").Rows(2)
  8.             .Windows(1).Visible = True
  9.             .Close True
  10.         End With
  11.         .Quit
  12.     End With
  13.     MsgBox "ok"
  14. End Sub
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-4-30 01:59 , Processed in 0.306262 second(s), 13 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表