ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¿z¿ï¹Ï¤ù,¨Ã´¡¤J«ü©wªºÄæ¦ì

1. ¥i¥HÀ°§Ú¸ÑÄÀ¤@¤U¶Ü? ¤£¤Ó¤F¸Ñ­C
2. ¥i¹Ï¤ù¦³52-T-1.jpg ©M53.jpg ³£µLªk´¡¤J²Ä52©M53¦C¸Ì­C
·P®¦ !

TOP

¦^´_ 1# jackyliu

¹Ï¤ù©R¦W³W«h¤£¬O«ÜÀ´¡A¥ý¸Õ¸Õ³o¼Ë¬Ý«ç¼Ë¤£¦P
  1. Sub Ex()
  2. Dim A As Range, C As Range
  3. ar = Array("C", "F", "T")
  4. ay = Array(8, 9, 10)
  5. ak = Array("", 0, 1, 2, 3)
  6. fd = "C:\TEST\" '¹Ï¤ù¥Ø¿ý
  7. With Sheet1
  8. .Pictures.Delete
  9. For Each C In .Range(.[C3], .[C65536].End(xlUp))
  10. r = C.Row
  11.     For i = 0 To 2
  12.        For j = 0 To 3
  13.        mystr = IIf(ak(j) = "", "", "-" & ak(j))
  14.        fs = C & "-" & ar(i) & mystr & ".jpg"
  15.        If Dir(fd & fs) <> "" Then
  16.           Set A = .Cells(r, IIf(j = 0, ay(i), 10 + j))
  17.           With .Pictures.Insert(fd & fs)
  18.             .Top = A.Top: .Left = A.Left: .Height = A.Height: .Width = A.Width
  19.           End With
  20.        End If
  21.        Next
  22.     Next
  23. Next
  24. End With
  25. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¯à¥I¥X·R¤ß´N¬OºÖ¡A¯à®ø°£·Ð´o´N¬O¼z¡C
ªð¦^¦Cªí ¤W¤@¥DÃD