- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
Y¬O"¹Ï¤ù¸ê®Æ§¨"¸ô®|¡A¦b¤£¬O«Ü©T©wªº¸ô®|Ū¨úªº¸Ü¡A¨Sªk°õ¦æÀÉ®×Ū¨ú¡A¨Ò¦p:¦³¥i·|©ñ¦bdropbox¶³ºÝ¡A¤]¦³¥i¯à©ñ¦bÀH¨µwºÐ©Î¥ô¦ó¹q¸£ªººÏºÐ¸Ì¡An«ç¼Ë¤~¯à¥uŪ¨ú¯S©w¸ê®Æ§¨·Ó¤ù¸ê®Æ¡A¤£¥Îµ¹¥L¥¿½Tªº¸ô®|¡A¦]¬°¸ô®|·|ÅܨÓÅÜ¥h¡A°ß¤@¤£Åܪº¬OÀɦW"¹Ï¤ùªº¸ê®Æ§¨"¡A½Ð¦Ñ®vÌÀ°¦£¸ÑÃD¡AÁÂÁÂ!!!
ªþÀÉ:
20151125.rar (756.34 KB)
Sub Ex()
Dim xPath As String, xFile As String, Sp As Integer, Cz As Integer, G As Long, K As Integer, Mh As Integer
Dim ii As Integer
xPath = "D:\mydata\Desktop\·s¼W¸ê®Æ§¨ (2)\¹Ï¤ù¸ê®Æ§¨\" '¹Ï¤ùªº¸ê®Æ§¨
'Dir ¨ç¼Æ ¶Ç¦^¤@Ó String ¡A¥Î¥Hªí¥Ü¦X¥G±ø¥ó¡BÀÉ®×ÄÝ©Ê¡BºÏºÐ¼Ð°Oªº¤@ÓÀɮצWºÙ¡B©Î¥Ø¿ý¡BÀɮק¨¦WºÙ¡C
xFile = Dir(xPath & "*.jpg") '¹Ï¤ùªº°ÆÀɦW ¬°jpg
xFile = Dir(xPath & "*.*") '¹Ï¤ùªº¸ê®Æ§¨ ³£¬O¹Ï¤ùÀÉ
With ActiveSheet '§@¥Î¤¤ªº¤u§@ªí
Sp = 35 '¤ô¥
Cz = 160 '««ª½
G = 0.1 '°ª
K = 170 '¼e
Mh = 4 '¨C¦æ
.Pictures.Delete '§R°£ ©Ò¦³¹Ï¤ù
.[a:a] = "" '²M°£ AÄæ¸ê®Æ
ii = 1 '³]©w¬°1
Application.ScreenUpdating = False
Do
.Cells(ii, 1).Select '¿ï¾ÜAÄæ ªº²Ä ii Àx¦s®æ(ActiveCell :§@¥Î¤¤ªºÀx¦s®æ)
.Cells(ii, 1) = xFile '¼g¤WÀɦW
With .Pictures.Insert(xPath & xFile) '´¡¤J¹Ï¤ù
.Left = ActiveCell.Offset(, 1).Left '´¡¤J¹Ï¤ùªº¥ªºÝ¦ì¸m¬O: ActiveCell ¥k²¾2Ä檺¥ªºÝ
.Top = ActiveCell.Offset(, 1).Top '´¡¤J¹Ï¤ùªº¤WºÝ¦ì¸m¬O: ActiveCell ¥k²¾2Ä檺¤WºÝ
.Width = 250 '³]©w ´¡¤J¹Ï¤ùªº ¼e«×190
.Height = 150 '³]©w ´¡¤J¹Ï¤ùªº °ª«×143
ActiveCell.Offset(, 2).ColumnWidth = 30 '³]©w´¡¤J¹Ï¤ù©Ò¦bÀx¦s®æ ªº¼e
ActiveCell.Offset(, 2).RowHeight = .Height '³]©w´¡¤J¹Ï¤ù©Ò¦bÀx¦s®æ ªº°ª
End With
xFile = Dir 'Ä~Äò´M§ä¤U¤@ÓÀÉ®×
ii = ii + 1 'AÄæ ªº²Ä ii Àx¦s®æ©¹¤U¤@¦C
Loop Until xFile = "" 'Â÷¶} Do °j°éªº±ø¥ó¬O: §ä¤£¨ì ÀÉ®×
.[A1].Select
Selection.EntireColumn.AutoFit 'AutoFit ¤èªk ±N½d³ò¤¤ªºÄæ¼e©M¦C°ª½Õ¾ã¬°³Ì¾A·íªºÈ
Application.ScreenUpdating = True 'ScreenUpdating ÄÝ©Ê ©w¦pªG¿Ã¹õ§ó·s¥\¯à¬O¶}±Òªº«h¬° True¡CŪ/¼g Boolean
End With
End Sub |
|