- ©«¤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
|
¦^´_ 9# whirlwind963
¸Õ¸Õ¬Ý- Option Explicit
- Sub Ex()
- Dim fs, f, e As Variant, i As Integer, xCol As Integer
- Sheets(1).Activate
- ActiveSheet.Pictures.Delete
- xCol = 3 'Äæ¼Æ
- Set fs = CreateObject("Scripting.FileSystemObject").GetFolder("D:\¬Û¤ù")
- For Each e In fs.subfolders '¸ê®Æ§¨¶°¦Xª«¥ó
- i = 2 '¦C¼Æ
- Cells(i, xCol) = e.Name
- For Each f In e.Files 'Àɮ׶°¦Xª«¥ó
- If UCase(Mid(f, InStr(f, ".") + 1)) = "JPG" 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
- xCol = xCol + 1 'Äæ¼Æ
- Next
- End Sub
½Æ»s¥N½X |
|