没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
------------------------------------------------------------------------------------
Sub 多表合并()
Dim w As Workbook
For Each i In Range("a1:a130")
c = i.Address
k = i.Value
m = Dir(ThisWorkbook.Path & "\" & k & ".xls*")
j = j + 1
Set w = GetObject(ThisWorkbook.Path & "\" & m)
With w
.Sheets(1).Range("b2:b16").Copy
ThisWorkbook.Sheets(1).Range("b" & j).PasteSpecial 12, , , True
.Close
End With
Next
End Sub
----------------------------------------------------------------------------------
Sub 多表合并()
Dim w As Workbook
For Each i In Range("a1:a130")
c = i.Address
k = i.Value
m = Dir(ThisWorkbook.Path & "\" & k & ".xls*")
j = j + 1
Set w = GetObject(ThisWorkbook.Path & "\" & m)
With w
.Sheets(1).Range("b2:b16").Copy
ThisWorkbook.Sheets(1).Range("b" & j).PasteSpecial 12, , , True
.Close
End With
Next
End Sub
----------------------------------------------------------------------------------
Sub 批量导入图片()
For Each Shap In Sheet1.Shapes
If Shap.Type <> 8 Then Shap.Delete
Next Shap
For Each Rng In Range("a1:a130")
On Error Resume Next
i = ThisWorkbook.Path & "\" & Rng & " (1).jpg"
Set rngs = Cells(Rng.Row, 2)
Sheet1.Shapes.AddPicture i, True, True, rngs.Left, rngs.Top, rngs.Width, rngs.Height
Selection.Placement = xlMoveAndSize
Next Rng
End Sub
---------------------------------------------------------------------------------------
Selection.Placement = xlMoveAndSize (大小和位置随单元格而变)
Selection.Placement = xlMove (大小固定,位置随单元格而变)
Selection.Placement = xlFreeFloating (大小和位置固定)
-------------------------------------------------------------------------------------------
多工作簿合并(1)
Sub mergeeveryonexls() '将多个工作簿下的工作表依次对应合并到本工作簿下的工作表,即第一张工作表对应合并到第一张,第二张对应合并到第二张……
On Error Resume Next
Dim x As Variant, x1 As Variant, w As Workbook, wsh As Worksheet
For Each Shap In Sheet1.Shapes
If Shap.Type <> 8 Then Shap.Delete
Next Shap
For Each Rng In Range("a1:a130")
On Error Resume Next
i = ThisWorkbook.Path & "\" & Rng & " (1).jpg"
Set rngs = Cells(Rng.Row, 2)
Sheet1.Shapes.AddPicture i, True, True, rngs.Left, rngs.Top, rngs.Width, rngs.Height
Selection.Placement = xlMoveAndSize
Next Rng
End Sub
---------------------------------------------------------------------------------------
Selection.Placement = xlMoveAndSize (大小和位置随单元格而变)
Selection.Placement = xlMove (大小固定,位置随单元格而变)
Selection.Placement = xlFreeFloating (大小和位置固定)
-------------------------------------------------------------------------------------------
多工作簿合并(1)
Sub mergeeveryonexls() '将多个工作簿下的工作表依次对应合并到本工作簿下的工作表,即第一张工作表对应合并到第一张,第二张对应合并到第二张……
On Error Resume Next
Dim x As Variant, x1 As Variant, w As Workbook, wsh As Worksheet
剩余5页未读,继续阅读
资源评论
Felix.Yip
- 粉丝: 6
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功