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

[µo°Ý] ¦Û°Ê²£¥Í¸ê®Æ§¨

¦^´_ 1# PJChen
¸Õ¸Õ¬Ý
  1. Sub Ex()
  2. Set fdo = CreateObject("Scripting.FilesystemObject")
  3. With Workbooks.Open("P:\PJ-Home\NEDoc.xlsx")
  4.     With .Sheets("INV")
  5.        fs = Right(.[S8], 5) & "_" & .[Q8] & "_" & .[I8]
  6.        fd = "P:\Shipping Doc\NE-Logistics\" & fs
  7.        k = fdo.folderexists(fd)
  8.        ar = Split(fd, "\")
  9.        fn = ar(0)
  10.        For i = 1 To UBound(ar)
  11.        fn = fn & "\" & ar(i)
  12.           If fdo.folderexists(fn) = False Then fdo.createfolder fn
  13.        Next
  14.     End With
  15.     .SaveCopyAs fd & "\" & fs & ".xlsx"
  16.     .Close
  17. End With
  18. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD