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

vba´¡¤J¹Ï¤ù°ÝÃD

vba´¡¤J¹Ï¤ù°ÝÃD

·Q½Ð°Ý¤j®a
¹Ï¤ù¦s©ñ¸ô®|¬°  D:\catalogue\A.JPG
·íA2Àx¦s®æ¬°A®É¡AB2Àx¦s®æ¦Û°Ê´¡¤JA.JPGªº¹Ï¤ù
·íA3Àx¦s®æ¬°B®É¡AB3Àx¦s®æ«h¦Û°Ê´¡¤J¦WºÙ¬°B.JPGªº¹Ï¤ù
¦ý·íA4Àx¦s®æ¬°C®É¡A«h¦]¬°¸ô®|¤ºµLC.JPGªº¹Ï¤ù®ÉÅã¥ÜªÅ¥Õ
µ{¦¡½XÀ³¸Ó¦p¦ó°µ­×§ï?

´¡¤J¹Ï¤ù.rar (30.5 KB)

¦^´_ 1# h99949
  1. Option Explicit
  2. Sub ChangeSize()
  3.     Dim Mypath As String, E As Range, MyPic As Object
  4.     Mypath = "D:\catalogue\"
  5.     With Sheets("¤u§@ªí1")
  6.         .Pictures.Delete
  7.         For Each E In .Range("a2", .Range("a" & .Rows.Count).End(xlUp))
  8.         'For Each  : ¨Ì§Ç³B¸Ì¶°¦Xªº¦¨­û
  9.         '¶°¦Xªº¦¨­û: .Range("a2") ¨ì .Range("a" & .Rows.Count).End(xlUp))ªºÀx¦s®æ
  10.                                      '(±q³ÌÀx¦s®æ©³³¡ªº¦C©¹¨ì¦³¸ê®ÆªºÀx¦s®æ)
  11.             If Dir(Mypath & E & ".jpg") <> "" Then
  12.                 Set MyPic = ActiveSheet.Pictures.Insert(Mypath & E & ".jpg")
  13.                 With MyPic
  14.                     .ShapeRange.LockAspectRatio = msoFalse
  15.                     .Left = E.Cells(1, 2).Left
  16.                     .Top = E.Cells(1, 2).Top
  17.                     .Width = E.Cells(1, 2).Width
  18.                     .Height = E.Cells(1, 2).Height
  19.                 End With
  20.             End If
  21.         Next
  22.     End With
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


¹Ï¤ù¦s©ñ¸ô®|¬°  D:\catalogue\A.JPG
·íA2Àx¦s®æ¬°A®É¡AB2Àx¦s®æ¦Û°Ê´¡¤JA.JPGªº¹Ï¤ù
·íA3Àx¦s®æ¬°B®É¡AB3Àx¦s®æ«h¦Û°Ê´¡¤J¦WºÙ¬°B.JPGªº¹Ï¤ù
¦ý·íA4Àx¦s®æ¬°C®É¡A«h¦]¬°¸ô®|¤ºµLC.JPGªº¹Ï¤ù®ÉÅã¥ÜªÅ¥Õ
¦pªG­n¦A°l¥[¿é¤JDÀx¦s®æ¡AEÀx¦s®æ¦Û°Ê´¡¤J¹Ï¤ù
                      ¸ò¿é¤JGÀx¦s®æ¡AHÀx¦s®æ¦Û°Ê´¡¤J¹Ï¤ù


µ{¦¡½XÀ³¸Ó¦p¦ó°µ­×§ï?

´¡¤J¹Ï¤ù.rar (30.71 KB)

TOP

¦^´_ 3# h99949
  1. Option Explicit
  2. Sub ChangeSize()
  3.     Dim Mypath As String, E As Range, i As Integer ', MyPic As Object
  4.     Mypath = "D:\catalogue\"
  5.     With Sheets("¤u§@ªí1")
  6.         .Pictures.Delete
  7.         For i = 1 To 7 Step 3   'AÄæ ->1,DÄæ ->4,GÄæ ->7
  8.             For Each E In .UsedRange.Columns(i).Cells  ' 'AÄæ ->1,DÄæ ->4,GÄæ ->7
  9.                 If Dir(Mypath & E & ".jpg") <> "" Then
  10.                     'Set MyPic = ActiveSheet.Pictures.Insert(Mypath & E & ".jpg")
  11.                     With .Pictures.Insert(Mypath & E & ".jpg")
  12.                         .ShapeRange.LockAspectRatio = msoFalse
  13.                         .Left = E.Cells(1, 2).Left
  14.                         .Top = E.Cells(1, 2).Top
  15.                         .Width = E.Cells(1, 2).Width
  16.                         .Height = E.Cells(1, 2).Height
  17.                     End With
  18.                 End If
  19.             Next
  20.         Next
  21.     End With
  22. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE


  ½Ð°Ý¦pªG§Ú½Õ¾ã´¡¤Jªº¹Ï¤ù¤j¤p,µ{¦¡½XÀ³¸Ó­n¦b­þ¸Ì­×§ï??

TOP

¦^´_ 5# h99949
  1. Option Explicit
  2. Sub ChangeSize()
  3.     Dim Mypath As String, E As Range, i As Integer ', MyPic As Object
  4.     Mypath = "D:\catalogue\"
  5.     With Sheets("¤u§@ªí1")
  6.         .Pictures.Delete
  7.         For i = 1 To 7 Step 3   'AÄæ ->1,DÄæ ->4,GÄæ ->7
  8.             For Each E In .UsedRange.Columns(i).Cells  ' 'AÄæ ->1,DÄæ ->4,GÄæ ->7
  9.                
  10.                 E.ColumnWidth = 25      '½Õ¾ãÀx¦s®æ¼e«×
  11.                 E.RowHeight = 50        '½Õ¾ãÀx¦s®æ°ª«×
  12.                
  13.                 If Dir(Mypath & E & ".jpg") <> "" Then
  14.                     'Set MyPic = ActiveSheet.Pictures.Insert(Mypath & E & ".jpg")
  15.                     With .Pictures.Insert(Mypath & E & ".jpg")
  16.                         .ShapeRange.LockAspectRatio = msoFalse
  17.                         .Left = E.Cells(1, 2).Left
  18.                         .Top = E.Cells(1, 2).Top
  19.                         .Width = E.Cells(1, 2).Width   '=Àx¦s®æ¼e«×
  20.                         .Height = E.Cells(1, 2).Height '=Àx¦s®æ°ª«×
  21.                     End With
  22.                 End If
  23.             Next
  24.         Next
  25.     End With
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·P®¦ªº¤ß......

TOP

½Ð°Ý ­Y±N¹Ï¤ù§ï´¡¤JLÄæ, Äæ¦ì¼e«×»P°ª«×±q²Ä6¦æ¶}©l³]©w,­n§ï­þ?
ªþµù»¡©ú: AÄæ¤@¼Ë¬ö¿ý¹ÏÀɦW

TOP

        ÀR«ä¦Û¦b : ±o²z­nÄǤH¡A²zª½­n®ð©M¡C
ªð¦^¦Cªí ¤W¤@¥DÃD