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

´M§ä¯S©w¦r¤¸,¨Ã±N¤§«áªº¦r¤¸§ï¬°¤j¼g

¨D¥¨¶°-¤å¦rÀɤ¤¤§¤p¼g­^¤åÂà¤j¼g

DEAR ¥ý¶i

¨D¥¨¶°-¤å¦rÀɤ¤¤§¤p¼g­^¤åÂà¤j¼g
EX: À˵ø¤å¦rÀɤº¤§­^¤å¦r,¦p¦³¤p¼g,±N¥¦§ï¬°¤j¼g¨ú¥N¤§.   

PS: ¦³¼Æ­Ó¤å¦rÀɦAÀˬd  


¥H¤W,¦AÀ°¦£..

TOP

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2011-2-9 19:31 ½s¿è

³oºØ¥¨¶°»Ý¨D¶q«Ü¤j
ºô¤W¤]»á¦h
«Ý§Ú§ä¤@¤U

---------------------------------------------------------------------------
§Ú«Ü¤[¥H«e¦³µo¹L©« ¦bOFFICEºë­^­Ñ乐³¡¡y VBA¥æ¬y ¡zExcel ¼W¯q¶°(¥[¸ü§»)±M°Ï
#13 ©«
*********************************************
²{¦b©ñ¤W¨Óªº¬O§Ú¥H«eªº¤@­Ó§@«~
¬O¥Î¨ÓÂà´«­^¤å¤j¤p¼g¥Îªº
¥u­n¶}±ÒSETUP¨º­ÓÀÉ
«öSETUP´N¥i¥H¤F
*********************************************
[ ¥»©«³Ì¦Z¥Ñ HUNGCHILIN ¤_ 2006-10-22 21:37 编辑 ]
¦Û°Ê¦w¸Ë(&¨Ï¥Î»¡©ú)¤j¤p¼gÂà´«.rar (86.09 KB)

µ¥¤@¤U §Ú¦n¹³¦³§ï½s¹L ¨ì¶i¶¥¦¨«~°Ï¥h¤U¸ü
2011-02-09 19-31-14.jpg
http://forum.twbts.com/thread-2599-1-1.html

TOP

¦^´_ 1# txiec
  1.     Sub nn()
  2. fs = "ucase.txt" '¤å¦rÀɦì¸m
  3. fd = "temp.txt" '¼È¦sÀɹw³]¥Ø¿ý§Úªº¤å¥ó
  4. Open fs For Input As #1
  5. Open fd For Output As #2
  6. Do While Not EOF(1)
  7.     Line Input #1, TextLine
  8.     Print #2, UCase(TextLine)
  9. Loop
  10. Close #1
  11. Close #2
  12. Open fd For Input As #1
  13. Open fs For Output As #2
  14. Do While Not EOF(1)
  15. Line Input #1, TextLine
  16.     Print #2, UCase(TextLine)
  17. Loop
  18. Close #1
  19. Kill fd
  20. Close #2
  21. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

DEAR Hsieh ¥ý¥Í


¤£¦n·N«ä,¤S­n³Â·Ð±z¤F,  
¬O§_¥iÀ°¦£§ï¤@¤U,  
ex:
,¦b A¸ê®Æ§¨¤¤¤§ ©Ò¦³ txt  ÀÉ,     ¤¤¤§©Ò¦³­^¤å¦r,¤p¼g§ï¤j¼g, ¤j¼g§ï¤p¼g,  
Àx¦s©ó­ì¸ê®Æ§¨,  


«ô­Ó±ß¦~,, ·s¦~§Ö¼Ö..

ths.

txiec
hi...

TOP

¦^´_ 4# txiec
  1. Sub nn()
  2. fs = Dir("D:\A\*.txt") 'TXTÀɮצì¸m
  3. Do Until fs = ""
  4. fd = "temp.txt" '¼È¦sÀɹw³]¥Ø¿ý§Úªº¤å¥ó
  5. Open fs For Input As #1
  6. Open fd For Output As #2
  7. Do While Not EOF(1)
  8.     Line Input #1, TextLine
  9.     Print #2, UCase(TextLine)
  10. Loop
  11. Close #1
  12. Close #2
  13. Open fd For Input As #1
  14. Open fs For Output As #2
  15. Do While Not EOF(1)
  16. Line Input #1, TextLine
  17.     Print #2, UCase(TextLine)
  18. Loop
  19. Close #1
  20. Kill fd
  21. Close #2
  22. fs = Dir
  23. Loop
  24. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

DEAR DEAR Hsieh ¥ý¥Í


¤£¦n·N«ä.. ¶]¤£°Ê, ¥X²{:§ä¤£¨ìÀÉ®×.. :  

¤£ª¾,½Ð¦AÀ°¦£­×¤@¤U,

¥t½Ð±Ð,
1. ¦p¨Ó·½¸ê®Æ§¨,­n³]¦bEXCEL A2Äæ¦ì¤¤,À³¦p¦ó­×.
2. ¦p¨Ó·½ÀÉ®×,µLªþÀɦW. ¨º¥Î fd = "temp.txt" '¼È¦sÀɹw³]¥Ø¿ý§Úªº¤å¥ó,¦^¦s©ó®É,·|¼vÅTÀɦW,

¥H¤W,¦A³Â·Ð¤F,,.
hi...

TOP

DEAR Hsieh ¥ý¥Í


¤£¦n·N«ä.. ¶]¤£°Ê, ¥X²{:§ä¤£¨ìÀÉ®×.. :  

¤£ª¾,½Ð¦AÀ°¦£­×¤@¤U,

1. ¦p¨Ó·½¸ê®Æ§¨,­n³]¦bEXCEL A2Äæ¦ì¤¤,À³¦p¦ó­×.
2. ¦p¨Ó·½ÀÉ®×,µLªþÀɦW. ¨º¥Î fd = "temp.txt" '¼È¦sÀɹw³]¥Ø¿ý§Úªº¤å¥ó,¦^¦s©ó®É,·|¼vÅTÀɦW,  
3. ¥u»Ý¨DÀˬd¤Î§ï¤º®e¤¤¤§¯S§O¦WºÙ¤§«á¤§¦r¤¸.
EX:

A¸ê®Æ§¨¤¤¤§
12 Àɮפ¤¤§

Ad(2): aer2,AER3,     
We1 Rf   : aer2
We2 Rf   : AER3     

Âন:

AD(2): AER2,AER3,   
We1 Rf   : AER2
We2 Rf   : AER3     



13 Àɮפ¤¤§

Ad(3): aers4,aes5,AERS6   
We1 Rf   : aers4
We2 Rf   : aes5     
We3 Rf   : AERS6      


Âন:

Ad(3): AERS4,AES5,AERS6   
We1 Rf   : AERS4
We2 Rf   : AES5     
We3 Rf   : AERS6      








¥H¤W,¦A³Â·Ð¤F,,.

hi...
hi...

TOP

DEAR . ¥ý¶i,,


½Ð¦A¼·ªÅ,µ¹­Ó²³æ¥i¥Î¤§¥¨¶°µ{¦¡,,,,


¸U¤À·PÁÂ...


¯¬¤ß¶¶,,
hi...

TOP

´M§ä¯S©w¦r¤¸,¨Ã±N¤§«áªº¦r¤¸§ï¬°¤j¼g

dear . ¥ý¶i,,

½Ð¦AÀ°¦£ §ï¤@¤U,
    ¥H¤U¬°,¥ý«e¥Îªº... ±N¤å¦rÀɤº¤§¦Pexcel a5 ¤º®e,¨ú¥N¬° b5    ,save.

»Ý¨D.   
mystr = Replace(TEXTLINE, [a5], [b5])  ->>>>>>>??
¦p¦ó§ï¦¨, ´M§ä¯S©w¦r¤¸,¨Ã±N¤§«áªº¦r¤¸§ï¬°¤j¼g ??
½Ð¦AÀ°¦£..




Sub date_change()
fd = [a2]
fo = [B2]
If Dir(fo, vbDirectory) = "" Then
       MkDir fo
End If

fs = Dir(fd & "*.CSV")
Do Until fs = ""
Open fo & fs For Output As #2
  Open fd & fs For Input As #1
  Do While Not EOF(1)
   Line Input #1, TEXTLINE
   mystr = Replace(TEXTLINE, [a5], [b5])  ->>>>>>>??
   Print #2, mystr
Loop
Close #1
Close #2
'Kill fd & fs
fs = Dir()
Loop
End Sub
hi...

§Aªº·N«ä¬O....:

­ì¤å¬Oabcde
1.§äcd
´«¦¨ZX
->
abZXe

ÁÙ¬O....
2.
§äcd
´«¦¨zx
->
abzxE

ÁÙ¬O....
3.
§äcd
´«¦¨zx
->
CDZXE

¦pªG§A´£¨Ñªº¥N½X¨S¿ù
1ªº°µªk:
mystr = Replace(TEXTLINE, [a5], UPPER([b5]))
3ªº°µªk:
mystr = UPPER(Replace(TEXTLINE, [a5], [b5]))
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD