- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-4-10 16:09 ½s¿è
¦^´_ 16# baconbacons
¥Ñ©óªí®æ¬O½Æ»s½s¸¹1¤Î½s¸¹2ªºªí®æ¦Ó¨Ó ©Ò¥H¨C¦¸·s¼W¬Û¤ù·|¦h¥X¨âӪťլۤùÀx¦s®æ
Q:¬°¦ó¤@¦¸n,½Æ»s½s¸¹1¤Î½s¸¹2ªºªí®æ
1.°²³]·s¼W´¡¤J½s¸¹11ªº¬Û¤ù¡A§R°£ì¥ý½s¸¹11¤§«áªº¬Û¤ù¤Îªí®æ¡A«·s½Æ»s©Ò»Ýªí®æ¡A·s¼W½s¸¹11¬Û¤ù¦AŪ¤J¸ê®Æ§¨ªº¬Û¤ù¦Û½s¸¹12¶}©l¶K
Q: ·s¼W´¡¤J½s¸¹11ªº¬Û¤ù,¬°¦ó¬O:§R°£ì¥ý½s¸¹11¤§«áªº¬Û¤ù¤Îªí®æ,¦Ó¤£¥]§tì¥ý½s¸¹11¬Û¤ù¤Îªí®æ,
¬°¦ó¬O:¦Û½s¸¹12¶}©l¶K,¤£¬O¦Û½s¸¹11¶}©l¶K
2.°²³]·s¼W´¡¤J½s¸¹11ªº¬Û¤ù¡A½Æ»s·sªí®æ¡]2ªÅ¥Õ¬Û¤ùÀx¦s®æ¡^´¡¤J¡A·s¼W½s¸¹11¬Û¤ù¦A±N¬¡¶¤¤ªº¬Û¤ù¨Ì§Ç©¹¤W»¼¸É1±i
Q:¬°¦ón: ½Æ»s·sªí®æ¡]2ªÅ¥Õ¬Û¤ùÀx¦s®æ¡^´¡¤J,¦h¤@ªÅ¥Õ¦ì¸mº¸«á±N¬Û¤ù¨Ì§Ç©¹¤W»¼¸É1±i(¦h¦¹¤@Á|)
¬O³o¼Ë¶Ü?- Sub Ex()
- Dim myFSO As New FileSystemObject
- Dim Rng As Range, i As Integer
- Dim myPath As String
- Dim E As Variant
- myPath = ThisWorkbook.Path & "\ì©l¬Û¤ù" '¬Û¤ùªº¸ê®Æ§¨
- If myFSO.GetFolder(myPath).Files.Count > 0 Then '¦³ÀÉ®×
- With ActiveSheet '«ü©w¤u§@ªí
- .Pictures.Delete '§R°£©Ò¦³¬Û¤ù
- Set Rng = .[A3:O25] '¬Û¤ùªí®æ
- .Rows("26:" & .UsedRange.Rows.Count).Clear '²M°£ ²Ä¤@±i¬Û¤ù¥H«áªºªí®æ
- For Each E In myFSO.GetFolder(myPath).Files 'Àɮת«¥ó¶°¦X
- If UCase(E) Like "*.JPG" Then 'E (Àɮת«¥ó)¶Ç¦^§¹¾ã¸ô®|¦WºÙ , Like ¤ñ¹ï¬O§_¦³".JPG"ªº¦r¤¸
- With Rng.Offset((i) * Rng.Rows.Count + (i * 1)) '¬Û¤ùªºªí®æ¦ì¸m
- If i > 0 Then '²Ä2±i«á
- Rng.Copy
- .PasteSpecial xlPasteFormats
- .Value = Rng.Value
- .Range("A3") = i + 1 '¬Û¤ùªºªí®æ¦ì¸mªºRange("A3")
- End If
- .Range("C22") = E
- .Range("B3").Select '¬Û¤ùªºªí®æ¦ì¸mªºRange("B3")
- End With
- With .Pictures.Insert(E) '´¡¤JPÀɮת«¥ó(¬Û¤ù)
- .ShapeRange.LockAspectRatio = msoFalse
- .Top = Selection(1, 1).Top
- .Left = Selection(1, 1).Left
- .Width = Selection.Width
- .Height = Selection.Height
- End With
- i = i + 1
- End If
- Next
- End With
- End If
- MsgBox myPath & " ¸ê®Æ§¨¤¤" & IIf(i > 0, "¦@" & i & "±i", "¨S¦³") & "¬Û¤ù"
- End Sub
½Æ»s¥N½X |
|