|
楼主 |
发表于 2018-7-10 13:06
|
显示全部楼层
- Sub CES()
- Dim FSO, ff, w As String
- Dim i As Integer
-
- Set FSO = CreateObject("scripting.filesystemobject")
- Set ff = FSO.getfolder("C:\Users\sunwg2\Desktop\VOCs")
- s = ff.Files.Count
- ReDim Preserve ar(s)
- ReDim Preserve ar2(s)
- For Each f In ff.Files
- i = i + 1
- ar(i) = f
- ar2(i) = f.Name
- Next
-
- End Sub
- Sub 插入下一张图片()
- Call CES
- For Each im In ActiveSheet.Shapes
- If im.Name <> "Button 6" And im.Name <> "Button 7" Then
- im.Delete
- End If
- Next
- If z >= s Then
- z = 1
- Else
- z = z + 1
- End If
- ActiveSheet.Shapes.AddPicture ar(z), 1, 1, 0, 0, 635, 476 '图片大小为800*600*96dpi
- Sheet1.Range("a3") = ar2(z)
- end sub
复制代码 |
评分
-
1
查看全部评分
-
|