| ©«¤l5923 ¥DÃD13 ºëµØ1 ¿n¤À5986 ÂI¦W0  §@·~¨t²Îwin10 ³nÅ骩¥»Office 2010 ¾\ŪÅv150 ©Ê§O¨k ¨Ó¦Û¥xÆW°ò¶© µù¥U®É¶¡2010-5-1 ³Ì«áµn¿ý2022-1-23 
         
 | 
                
| ¦^´_ 11# whirlwind963 ½Æ»s¥N½XOption Explicit
Sub Ex()
    Dim j As Integer, MyPath As String, MyFile As String, k, L
    For k = 1 To 2                          'A,BÄæ
        For L = 4 To 5                      'D,EÄæ
            j = 2
            While Cells(j, "C") <> ""       'CÄæ¬°ÀɦW
                MyPath = Cells(j, k)        'AÄæ,BÄæ¬°¦ì§}
                If UCase(Cells(j, "C")) Like "*W*" Then  '¦r¦ê¤¤¦³"ABCD"
                    On Error Resume Next
                    MyFile = Dir(MyPath & "*" & Cells(j, "C") & "*.*")       '  C2 = "ABCD" ->"1AABCD.png"
                    If MyFile <> "" Then
                        Cells(j, L).Select   'D,EÄæ
                        With ActiveSheet.Pictures.Insert(MyPath & MyFile)
                            .ShapeRange.LockAspectRatio = msoFalse
                            .ShapeRange.Height = 100#
                            .ShapeRange.Width = 100#
                            .ShapeRange.Rotation = 0#
                            .Placement = xlMoveAndSize
                            .PrintObject = True
                        End With
                    End If
                End If
                j = j + 1
            Wend
            Range("C2").Select
        Next
    Next
End Sub
 | 
 |