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

[µo°Ý] ¦p¦ó§Ö³t«Ø¥ßªÅ¥Õ¸ê®Æ§¨

[µo°Ý] ¦p¦ó§Ö³t«Ø¥ßªÅ¥Õ¸ê®Æ§¨

¦U¦ì¤j¤j

¤p§Ì¸I¨ì«Ø¥ß¸ê®Æ§¨°ÝÃD, §Ú·Q¨Ï¥Î¨â­Ó«ö¶s±±¨î¤À§O¥h«Ø¥ß³æ­Ó©Î¦h­Ó¸ê®Æ§¨©ó®à­±¤W(¦pªþÀÉ»¡©ú)

·Ð½Ð¥ý¶i«ü¾É
TEST6.rar (15.05 KB)

¦^´_ 1# luke
  1. Sub ex()
  2. Set fdo = CreateObject("Scripting.FileSystemObject")
  3. fd = "C:\Documents and Settings\User\®à­±\"  '®à­±¸ô®|
  4. Set a = Columns("A").Find([B1], lookat:=xlWhole)
  5. If Not a Is Nothing Then
  6. fs = fd & Join(Application.Transpose(Application.Transpose(a.Offset(, 1).Resize(, 3))), "-") & "-" & Format(Date, "yyyymmdd") & "\"
  7. If fdo.folderexists(fs) = False Then MkDir fs
  8. End If
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2012-4-5 13:42 ½s¿è

¦^´_ 1# luke
  1. Option Explicit
  2. Sub «Ø¥ß()
  3.     Dim Rng As Range, xF As Variant, xlDesktop As String
  4.     Set Rng = Range("A7:A" & [A7].End(xlDown).Row)
  5.     Set xF = Rng.Find([b1], lookat:=xlWhole)
  6.      If xF Is Nothing Then Exit Sub
  7.     xF = Application.Transpose(Application.Transpose(Cells(xF.Row, "a").Resize(, 3).Value))
  8.     xF = Join(xF, "-") & "-" & Format(Date, "yymmdd")
  9.     xlDesktop = Get_Desktop
  10.     If Dir(xlDesktop & xF, 16) = "" Then MkDir (xlDesktop & xF)  '
  11. End Sub
  12. Sub ¥þ¿ï()
  13.     Dim E As Range, xF As Variant, xlDesktop As String
  14.      xlDesktop = Get_Desktop
  15.      For Each E In Range("A7:A" & [A7].End(xlDown).Row)
  16.         xF = Application.Transpose(Application.Transpose(Cells(E.Row, "a").Resize(, 3).Value))
  17.         xF = Join(xF, "-") & "-" & Format(Date, "yymmdd")
  18.         If Dir(xlDesktop & xF, 16) = "" Then MkDir (xlDesktop & xF)
  19.     Next
  20. End Sub
  21. Private Function Get_Desktop() As String  '¨ç¼Æ : ¶Ç¦^©Ò¦b¹q¸£ªº®à­±¸ô®|
  22.     Dim ob As Object
  23.     Set ob = CreateObject("Wscript.Shell")
  24.     Get_Desktop = ob.SpecialFolders("Desktop") & "\"
  25. End Function
½Æ»s¥N½X

TOP

¦^´_ 2# Hsieh


    «Ø¥ß³æ­Ó¸ê®Æ§¨´ú¸ÕOK

    ÁÂÁÂH¤j

TOP

¦^´_ 4# luke

     «ö¶s´ú¸Õ«Ø¥ß³æ/¦h­Ó¸ê®Æ§¨OK
   
    ÁÂÁÂGBKEEª©¤j

TOP

        ÀR«ä¦Û¦b : §Ú­Ì³Ì¤jªº¼Ä¤H¤£¬O§O¤H¡D¥i¯à¬O¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD