- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 25# c_c_lai
Dim f As Variant ³o¼Ë¸Õ¸Õ, 2007ÁÙ¦³¿ù»~¶Ü?
¦^´_ 27# whirlwind963 - Option Explicit
- Dim i As Integer, xCol As Integer
- Sub Ex()
- Dim fs, f As Object, e As Object
- Sheets(1).Activate
- ActiveSheet.Pictures.Delete
- Set fs = CreateObject("Scripting.FileSystemObject").GetFolder("D:\2012-12-12")
- xCol = 3 'Äæ¼Æ
- For Each e In fs.subfolders '¸ê®Æ§¨¶°¦Xª«¥ó
- i = 1 '¦C¼Æ
- ¤l¸ê®Æ§¨ e
- xCol = xCol + 1 'Äæ¼Æ
- Next
- End Sub
- Private Sub ¤l¸ê®Æ§¨(¸ê®Æ§¨ As Variant)
- Dim fs As Object, f As Variant
- Set fs = CreateObject("Scripting.FileSystemObject").GetFolder(¸ê®Æ§¨)
- For Each f In fs.Files 'ÀÉ®×:¶°¦Xª«¥ó
- If UCase(f) Like "*.JPG" Or UCase(f) Like "*.GIF" Or UCase(f) Like "*.BMP" Then
- i = i + 1
- With ActiveSheet.Pictures.Insert(f)
- .Top = Cells(i, xCol).Top
- .Left = Cells(i, xCol).Left
- .Height = 49.5
- .Width = 49.5
- Cells(i, xCol).RowHeight = .Height
- Cells(i, xCol).ColumnWidth = .Width / 5.5
- End With
- End If
- Next
- For Each f In fs.subfolders '¸ê®Æ§¨:¶°¦Xª«¥ó
- i = i + 1
- ¤l¸ê®Æ§¨ f '¦A«×©I¥s (¥»µ{§Ç)
- Next
- End Sub
½Æ»s¥N½X |
|