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

[µo°Ý] ²¾°Ê¸ê®Æ§¨¤ºªºÀÉ®×

[µo°Ý] ²¾°Ê¸ê®Æ§¨¤ºªºÀÉ®×

¥»©«³Ì«á¥Ñ PJChen ©ó 2022-1-5 19:47 ½s¿è

¦U¦ì¤j¤j¦n,

½Ð±Ð....
Å禬³æ¸ê®Æ.xlsx ­ì¥»¬O¦b¹q¸£¤¤ªºD:
¦ý³Ìªñ¤½¥q§ï¥ÎNAS,·í²¾°ÊÀÉ®×®É,·|¥X²{¹ï¸Ü®Ø,
ĵ§iÀÉ®×¥i¯à¦³®`,¬O§_¤´­n¨Ï¥Î¥¦?
³o·|¨Ïµ{¦¡µLªkÄ~Äò,
¦ý¬O¥Î°Å¤U>>¶K¤W,«h¤£·|¦³Äµ§i¥X²{¡I
½Ð°Ý¥H¤Uµ{¦¡,¦p¦ó§ï¦¨ °Å¤U>>¶K¤Wªº¼gªk
©ÎªÌ¦³¨ä¥L¼gªk¨Ïµ{¦¡¤£¤¤Â_¡H
  1. Sub Å禬³æÂkÀÉ()
  2. Dim fds As Object, PH$, xPH$, FN$, i$, xD As Worksheet
  3. Application.ScreenUpdating = False
  4. Application.DisplayAlerts = False

  5. Set xD = ThisWorkbook.Sheets("VBA")  'µ{¦¡¨Ó·½
  6. i = Format(Date, "yyyymmdd")

  7. PH="\\192.......\­ÜÀx\Å禬³æ\"
  8. xPH = "\\192......\­ÜÀx\Å禬³æ\ÂkÀÉ\"
  9. Set fds = CreateObject("Scripting.filesystemobject")

  10. FN = Dir(PH & "*" & Å禬³æ¸ê®Æ & "*" & i & "*" & ".XLS*")  '¨Ó·½¸ê®Æ§¨¤ºªºÀɮצW
  11. '-------------
  12.     If fds.FileExists(xPH & FN) Then Kill xPH & FN '¦pªGÀɮפw¸g¦s¦b´N¥ý§R°£ÀÉ®×
  13.        fds.movefile PH & FN, xPH '²¾°ÊÀɮרì¥Ø¼Ð¸ê®Æ§¨
½Æ»s¥N½X

¥»©«³Ì«á¥Ñ singo1232001 ©ó 2022-1-25 02:02 ½s¿è

¥Ñ©ó¥»¤H¤]¨S¸gÅç
¥u¯à·Q¨ì¨âºØ¤è¦¡

   1.¥ÎApplication.SendKeys "{ENTER}"  ¥i¥H·f°tif§PÂ_«e­±¬O§_192¶}ÀY

2.³o´N¦³ÂIÃø= =
http://forum.twbts.com/viewthread.php?tid=19128  
¤W­z5¼Ó¦³´£¨Ñ¤@­Ó¤èªk ¥i¥H°Ñ¦Ò ¨S¹ê»Ú¹Á¸Õ¹L ©Î³\´N¤£¥Î³Ðvbs

¦pªG¬Oµ{§Ç±j¨î¥d¦í¤£Åý§A¶]  ¥i¯à»Ý­n¥Îvbs¥h¾Þ§@ µ¥©ó¥s¤p§Ì¦b®ÇÃ仲§U
ªü°¶Å¥¸Ü  ³Ç­ô¤U¤@¬í´N­n¥d¤F  °O±oÀ°¦£«öenter ¤j·§¬O³o¼Ë....

ÁÙ¦³§ó¨ë¿Eªº¾Þ§@....
¬Æ¦Ü³o¥÷vbsÀÉ ³£¥Îvba³Ð¥X¨Ó ´N¥²¶·­n¥Î¨ì·s¼Wtxt+»Ptxt¼g¤J+¦sÀɦ¨vbs
https://stackoverflow.com/questions/22428667/append-to-text-file-vba/22429594
«Ü¹³¤W­±³o¼Ë
µM«á¦b­n¥d¤§«e °õ¦ætxt

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD