- ©«¤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
        
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-12-5 11:17 ½s¿è
¦^´_ 1# a703130 - Option Explicit
- Sub Ex() '§PÂ_¸ê®Æ§¨¤º¬O§_¦³ÀÉ®×
- 'Dir("D:\test\*.PNG") = "" ¬°¸ê®Æ§¨¤¤ÀɮרS¦³°ÆÀɦW¬OPNGªºÀÉ®×
- '§PÂ_¸ê®Æ§¨¤¤Àɮ׬O§_¦³ÃöÁä¦r ".PNG & .JPG"
- If Dir("D:\test\*.PNG") = "" And Dir("D:\test\*.JPG") = "" Then MsgBox "¸ê®Æ§¨¤¤¨S¦³ .PNG .JPG"
- End Sub
½Æ»s¥N½X ¾ã²z¤@¤U§Aªºµ{¦¡½X- Option Explicit
- Sub InsertImage(ImagePath, FolderName)
- Dim ReadRow As Integer, ImageName As String
- Sheets("a").Select
- ReadRow = 24
- '§PÂ_Safety¶±²Ä¤@Äæ¬O§_¦³»Ýn¸ü¤J¹ÏÀɪ½¦Ü¥X²{"END"¦r¼Ë
- Do Until UCase(Cells(ReadRow, 1)) = "END"
- 'ImageName = Cells(ReadRow, 1)
- ImageName = ImagePath & "\" & FolderName & "\" & Cells(ReadRow, 1)
- If InStr(ImageName, ".PNG") Or InStr(ImageName, ".JPG") Then
- If Dir(ImageName) <> "" Then
- Cells(ReadRow, 2).Select
- ActiveSheet.Pictures.Insert(ImageName).Select
- Call ImageSize
- End If
- End If
- ReadRow = ReadRow + 1
- Loop
- End Sub
½Æ»s¥N½X |
|