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

¨ÌExcelÀɦW¦Û°ÊÀx¦s¦b¬Û¦P¦WºÙ¥Ø¿ý

¨ÌExcelÀɦW¦Û°ÊÀx¦s¦b¬Û¦P¦WºÙ¥Ø¿ý

¥i¥H¨ÌExcelÀɦWA¦WºÙ¦Û°ÊÀx¦s¦b¬Û¦P¦WºÙA¥Ø¿ýªºB¤l¥Ø¿ý¸Ì¡A¸Ó¦p¦ó³B¸Ì?
¨Ò¦p¡GA-B-C.EXCEL
¦sÀɥؿý¡GC:\[A]\[B](¤l¥Ø¿ý)

¦^´_ 1# yueh0720
  1. Sub nn()
  2. ar = Split(ThisWorkbook.Name, "_")
  3. fs = "C:\" & ar(0) & "\" & ar(1) & "\" & ThisWorkbook.Name
  4. ThisWorkbook.SaveAs fds
  5. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

    ÀɮצWºÙ A-B-C.EXCEL
    ¤w¦bc:\«Ø¥ß¥Ø¿ý¬°[A]
    [A]¥Ø¿ý«Ø¥ß¤l¥Ø¿ý[D]
    ±Nµ{¦¡½X¶K©óA-B-C.EXCLE¡A°õ¦æ«á«o¥X²{¶W¥X°}¦C½d³ò
   »Ý­n­×§ï¦ó¦a¤è¤~¯à°÷¨ÌEXCELÀɦWÀx¦s¨ìA¥Ø¿ýªºD¤l¥Ø¿ý¤¤

TOP

¦^´_ 3# yueh0720
¨S¦³³W«hªº°ÝÃD¡A¬OµLªk¦Û°Ê¤Æªº
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ FAlonso ©ó 2010-12-15 22:31 ½s¿è
¦^´_  Hsieh

    ÀɮצWºÙ A-B-C.EXCEL
    ¤w¦bc:\«Ø¥ß¥Ø¿ý¬°[A]
    [A]¥Ø¿ý«Ø¥ß¤l¥Ø¿ý[D]
    ±N ...
yueh0720 µoªí©ó 2010-12-15 15:55

§Aªº°ÝÃD¬O,windows¨t²Î¤¤¨S¦³excel file¦WºÙ©Ò­n¨D¤å¥ó§¨,©Ò¥H¾É­P¿ù»~?
  1. Sub save_in_particular_folder()
  2. Dim myarray
  3. Dim target_folder As String, target_file
  4. Dim FSOobject As Object
  5. myarray = Split(ThisWorkbook.Name, ".xls", -1)
  6. myarray = Split(myarray(0), "-", -1)
  7. target_folder = "D:\Tony\Excel VBA\" & myarray(0) & "\" & myarray(1)
  8. target_file = target_folder & "\" & ThisWorkbook.Name
  9. If Len(Dir(target_folder, vbDirectory)) = 0 Then
  10.     Set FSOobject = CreateObject("scripting.filesystemobject")
  11.     FSOobject.createfolder (target_folder)
  12.     ThisWorkbook.SaveAs target_file
  13.    Set FSOobject = Nothing
  14. Else
  15.    ThisWorkbook.SaveAs target_file
  16. End If
  17. End Sub
½Æ»s¥N½X
³o¬O¤£¬O¨Ò¦p¹³³o­Ó?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD