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

[µo°Ý] ½Ð°Ý¦p¦ó¦bexcel¸Ì­±§Q¥Î¿é¤J¹Ï¦Wvba¶K¹Ï

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-24 05:26 ½s¿è

¦^´_ 1# xlarge16803
  1. Option Explicit
  2. Sub ¸ü¤J¹Ï¤ù()
  3.     Dim MyRng As Range, XR As Range, uPath$, y&, xFile$
  4.     Set MyRng = [A3]
  5.     If [A3] = "" Then MsgBox "µL¹ÏÀɦWºÙ¡I": Exit Sub
  6.     'ThisWorkbook.Path ¶Ç¦^³o¬¡­¶Ã¯ÀɮצsÀɪº¸ô®| ¦p ="C:\"
  7.     uPath = ThisWorkbook.Path & "c:/my picture/" ' =>"C:\c:/my picture/" ³o¬O¿ù»~ªº¸ô®|?
  8.     '¬O³o¼Ë§a!!
  9.     uPath = ThisWorkbook.Path '->= "c:/my picture" ¹ï¶Ü???
  10.     If Dir(uPath, vbDirectory) = "" Then MsgBox "§ä¤£¨ì¹ÏÀɸê®Æ§¨¡I": Exit Sub
  11.     ActiveSheet.Pictures.Delete
  12.     Application.ScreenUpdating = False
  13.     For Each XR In Union([B3], [C3], [D3], [E3])
  14.         y = y + 1
  15.         xFile = uPath & "\" & MyRng & "-" & y & ".JPG"
  16.         If Dir(xFile) <> "" Then
  17.             With ActiveSheet.Pictures.Insert(xFile)
  18.             .ShapeRange.LockAspectRatio = msoFalse
  19.             .Width = XR.Width
  20.             .Height = XR.Height
  21.             .Left = XR.Left
  22.             .Top = XR.Top
  23.             End With
  24.         End If
  25.     Next
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 3# xlarge16803
¨S¬ÝÀɮפε{¦¡½X,¦p¦ó·|ª¾¹D§A¿ù»~¦b­þ¸Ì.
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD