- ©«¤l
- 72
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 90
- ÂI¦W
- 0
- §@·~¨t²Î
- windows xp
- ³nÅ骩¥»
- office 2000
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2011-2-14
- ³Ì«áµn¿ý
- 2024-10-13
|
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)
|