- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2019-11-29 21:26 ½s¿è
Dear,
...
1. ¦Û°Ê°»´ú°Ó«~.xlsx¬O§_¤w¶}±Ò,¤w¶}«h©¿²¤,¥¼¶}«h¥´¶}...
PJChen µoªí©ó 2019-11-26 00:04
¥ý¸Ñ¨M§Aªº²Ä¤@Ó°ÝÃD,
¦b§Aµoªº¨º¦ê : [µo°Ý] ¦Û°Ê®Mªí 5# ²Ä 5 ½g¸Ì,
§Úªº¦^¤å¸Ì¦³¤@¬q´N¬O¦b³B²z§A³oӻݨD :- sPath = ThisWorkbook.Path ' ¦pªGn«ü©w¥Ø¿ý, ¥un§ï¦¨¸Ó¥Ø¿ý§Y¥i, ¦p sPath = "D:"
- sFlName = "°Ó«~.xlsx"
- bMatch = False ' Àˬd '°Ó«~.xlsx' Àɮ׬O§_¤w¶}±Ò
- For iI = 1 To Workbooks.Count
- If Workbooks(iI).Name = sFlName Then
- bMatch = True
- Exit For
- End If
- Next iI
- If bMatch Then
- Set wsTar = Workbooks(sFlName).Sheets("¸¤ñ°Ó«~") ' Àɮפw¶}±Ò, ª½±µ¨ú¥Î
- wsTar.Activate
- Else
- Set wsTar = Workbooks.Open(Filename:=sPath & "\" & sFlName).Sheets("¸¤ñ°Ó«~") ' Àɮש|¥¼¶}±Ò, ¶}±Ò«á¨ú¥Î
- End If
- With wsTar
- ....
- End With
½Æ»s¥N½X ¨ú¥Î®É¥un¦b With wsTar »P End With ¨â¦æ¶¡¥Î . ¶}ÀYªº«ü¥O§Y¥i,
¨Ò¦p : .[A5] = 16 ©Î .Cells(3,5)=2 ...µ¥
2. ¦Û°Ê°»´ú°Ó«~.xlsxªº¦C¼Æ(°Ó«~.xlsx·|¦³³Ì·sªº²£«~¸ê®Æ,¦Ó¥B¦C¼Æ·|¦³¼W¥[¤Î´î¤Öªº¥i¯à©Ê)
³Ì¥½¦C¸¹¥i¥H¥ÎÃþ¦ü- lRow = .Cells(Rows.Count, 1).End(XlUp).Row ' 1 ªí¨ú±o A Äæ³Ì¥½¦³¸ê®Æ¦C¸¹
½Æ»s¥N½X ¨ú±o
¦³¨Æ¥ý¤U¤F,
¨ä¥¦ªºY§Ú¦³®É¶¡¤W¨Ó¦A¤¬¬Û°Q½×. |
|