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

[¤À¨É] (¤w¸Ñ¨M)½Ð°Ý¤j¤j,¦pªGEXCEL 2003Âà´«¦Ü2010,­ìµ{¦¡­n¦p¦ó­×¥¿?

¦^´_ 1# cmo140497


    [url]http://chijanzen.net/wp/?p=495[/url]
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# cmo140497
§Aªº¥Øªº¬°¦ó§Ú¤£ª¾¹D¡A¦ý­n·s¼W¹Ï¤ù¥u­n§ï¦¨¥H¤U¬yµ{§Y¥i
  1. Sub STARTGETSINF()
  2. Dim Fs As Object, E, i As Integer, P, ii As Integer
  3.     Dim xlPath As String
  4.     Dim myWb As Workbook
  5.     Dim myFileName As String
  6. Cells.Clear
  7. ActiveWindow.Zoom = 75
  8. Rows("2:9999").EntireRow.AutoFit
  9. Columns("B:Y").ColumnWidth = 2

  10. With Application.FileDialog(msoFileDialogFolderPicker)
  11.         .AllowMultiSelect = False
  12.         .InitialFileName = "D:\Export\SINF\"
  13.         .Show
  14.         If .SelectedItems.Count = 0 Then Exit Sub
  15.         xlPath = .SelectedItems(1)
  16. End With

  17. With CreateObject("Scripting.FileSystemObject").GetFolder(xlPath)
  18.         i = 1
  19.         For Each E In .SubFolders
  20.             If i > ActiveWorkbook.Sheets.Count Then
  21.                 Sheets.Add(, Sheets(Sheets.Count)).Name = E.Name
  22.             Else
  23.                 Sheets(i).Name = E.Name
  24.             End If
  25.             ii = 2
  26.            For Each P In E.Files
  27.               If InStr(UCase(P.Name), ".JPG") Then
  28.                 ActiveWindow.Zoom = 75
  29.                                                 
  30.                 With Sheets(i).Cells(ii, 2).Select                         '³]©w¹Ï¤ùÄæ¦ì¤j¤p
  31.                      With Selection
  32.                       .RowHeight = 60
  33.                       .ColumnWidth = 9.5
  34.                       .WrapText = True
  35.                      End With
  36.                      
  37.                       t = Cells(ii, 2).Top + Cells(ii, 2).Height * 0.1  '¹Ï¤ù¤W¦ì¸m
  38.                       l = Cells(ii, 2).Left + Cells(ii, 2).Width * 0.1 '¹Ï¤ù¥ª¦ì¸m
  39.                       w = 50                                          '¹Ï¤ùÁY¤p50%¼e«×
  40.                       h = 50                                         '¹Ï¤ùÁY¤p50%°ª«×

  41.                   With Sheets(i).Shapes.AddPicture(P, True, True, l, t, w, h) 'BÄæ´¡¤J¹Ï¤ù
  42.                       .Placement = xlMove                        '¹Ï¤ù¤j¤pÀHÀx¦s®æ¦ì¸m¦Ó§ïÅÜ

  43.                          With Sheets(i)                                    'AÄæ´¡¤J¹Ï¤ù¦WºÙ
  44.                            '.Cells(ii, 1) = P.Name                          '¹Ï¤ùÀɮצWºÙ
  45.                            .Cells(ii, 1) = P                              '¹Ï¤ùÀɮק¹¾ã¸ô®|
  46.                          End With
  47.                   End With
  48.                 End With
  49.                 ii = ii + 1                                                '¤@¦¸¸õªºÄæ¦ì¼Æ
  50.               End If
  51.             Next
  52.         Next
  53.     End With
  54.    
  55. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : °µ¸Ó°µªº¨Æ¬O´¼¼z¡A°µ¤£¸Ó°µªº¨Æ¬O·Mè¡C
ªð¦^¦Cªí ¤W¤@¥DÃD