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

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

¥i¥H¤F ­C  , ·PÁ±zªºÀ°¦£

TOP

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True And Cancel = False Then
Dim vbc As Object
With ThisWorkbook.VBProject
For Each vbc In .VBComponents
  Select Case vbc.Type
  Case vbext_rk_Project, vbext_wt_Browser, vbext_ct_MSForm 'µù
    .VBComponents.Remove .Item(vbc.Name)

  Case Else
    .VBComponents(vbc.Name).CodeModule.DeleteLines 1, _
    .VBComponents(vbc.Name).CodeModule.CountOfLines

  End Select
Next
End With
End If
End Sub


Private Sub Workbook_Open()
Set d = CreateObject("Scripting.Dictionary")
fd = ThisWorkbook.Path & "\" '¹ÏÀɥؿý
fs = Dir(fd & "*.jpg")
Do Until fs = ""
If InStr(fs, "-") = 0 Then '¥u¦³¼Æ­È
   d(fs) = "H" & Val(fs) + 2 '¦]¬°¦b²Ä¦C©Ò¥H¥[2
   ElseIf Len(fs) - Len(Replace(fs, "-", "")) = 1 Then '¥u¦³1­Ó¤À¹j²Å¸¹
   '²Ä2½X¬°C´N¬OIÄæ¡A§_«h´N¦bJÄæ
   V = Split(fs, "-")(1)
     If Split(fs, "-")(1) Like "C*" Then d(fs) = "I" & Val(fs) + 2 Else d(fs) = "J" & Val(fs) + 2
   Else
   '²Ä3½X¬O1´N¦bKÄæ¡A2´N¦bLÄæ¡A¨ä¾l¦bMÄæ
   ar = Split(fs, "-")
   p = IIf(ar(1) = "C", Asc("K"), Asc("L")) '²Ä2½X¬OC´N¶Ç¦^"K"ªº¦r¤¸½X¡A²Ä2½X¬OT´N¶Ç¦^"L"ªº¦r¤¸½Xµ¹ÅܼÆp
   k = Chr(Val(ar(2)) * 2 + p) '¦r¦êÅܼÆkªº­È¬O²Ä3½X+p¹ïÀ³¨ìªº¦r¦ê(´N¬OÄæ¦ì)
   d(fs) = k & Val(fs) + 2
End If
fs = Dir
Loop
With Sheets("Sheet1")
.Pictures.Delete '²M°£©Ò¦³¹Ï¤ù
Application.ScreenUpdating = False
For Each ky In d.keys
   Set A = .Range(d(ky)) '¹Ï¤ù´¡¤Jªº¦ì¸m
      With .Pictures.Insert(fd & ky) '´¡¤J¹ÏÀÉ
         .ShapeRange.LockAspectRatio = msoFalse '¸Ñ°£ªø¼e¤ñ¨Ò
         .Top = A.Top
         .Left = A.Left
         .Height = A.Height
         .Width = A.Width
       End With
Next
End With
Application.ScreenUpdating = True
End Sub

¥Ø«e·Q§ï¦¨±qI Äæ¦ì¶}©l´¡¤J¹Ï¤ù;¹Ï¤ù¦WºÙ¦³1,1-1,1-2 ~1-20 ,¦@21±i¹Ï,
´ú¸Õ¤F¦n¤[¤@ª½§ï¤£¥X¨Ó,À°¦£«üÂI¦n¶Ü?

2-1.jpg (15.01 KB)

2-1.jpg

TOP

        ÀR«ä¦Û¦b : ¤p¨Æ¤£°µ¡B¤j¨ÆÃø¦¨¡C
ªð¦^¦Cªí ¤W¤@¥DÃD