Chinaunix首页 | 论坛 | 博客
  • 博客访问: 37320
  • 博文数量: 14
  • 博客积分: 467
  • 博客等级: 一等列兵
  • 技术积分: 142
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-02 13:14
文章分类

全部博文(14)

文章存档

2013年(1)

2012年(13)

我的朋友

发布时间:2012-06-21 13:21:57

......【阅读全文】

阅读(1036) | 评论(0) | 转发(0)

发布时间:2012-06-21 13:21:03

......【阅读全文】

阅读(774) | 评论(0) | 转发(0)

发布时间:2012-06-21 13:19:55

......【阅读全文】

阅读(643) | 评论(0) | 转发(0)

发布时间:2012-06-21 13:18:29

......【阅读全文】

阅读(649) | 评论(0) | 转发(0)

发布时间:2012-06-21 13:14:15

......【阅读全文】

阅读(485) | 评论(0) | 转发(0)
给主人留下些什么吧!~~

beijinglb2013-04-19 00:04

Sub copysheet3()
Dim ip As String

Dim xlApp As Excel.Application
    Dim xlBook As Excel.Workbook
    Set xlApp = New Excel.Application
Set xlBook = xlApp.Workbooks.Open("D:\book\office\excel\VBA1.xlsx")

Dim sheetx As Excel.Worksheet
Set sheetx = xlBook.Worksheets(1)
ip = sheetx.Cells(1, 2)
Sheet1.Cells(1.1) = ip

End Sub

回复  |  举报

beijinglb2013-04-19 00:04

Sub copyAll()

fname = "D:\book\office\excel\VBA1.xlsx"        '需要复制的excel文件地址及文件名,你自己修改
Set d = GetObject(fname)      '打开文件
d.Sheets("link").Cells.Copy ActiveSheet.Cells(1, 1)    '将sheet1完全复制到当前表
d.s
d.Close  '关闭文件
Set d = Nothing
End Sub

回复  |  举报
留言热议
请登录后留言。

登录 注册