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

[µo°Ý] ·Q½Ð°Ý¦Û°Ê¦sÀɸô®|¦p¦óŪ¨úŪÀx¦s®æ°µ¸ô®|©O?

[µo°Ý] ·Q½Ð°Ý¦Û°Ê¦sÀɸô®|¦p¦óŪ¨úŪÀx¦s®æ°µ¸ô®|©O?

¥»©«³Ì«á¥Ñ starry1314 ©ó 2015-6-4 17:14 ½s¿è

ActiveWorkbook.SaveAs Filename:="D:\¥Ø¿ý\" & Range("A2") & "-" & Format(Range("B2"), "yyyymmddhhss") & ".xlsm"
¤ñ¦p¸ê®Æ§¨ ¥Ø¿ý\Q°Ï
B2=Q ©Î¬O Q°Ï

­n¦p¦ó­×§ï¥iÅý¥Ø¿ý\«á¤è¬OŪ¨úB2ªºQ°Ï°µ¬°¸ô®|©O?

¿ù»~­È....
ActiveWorkbook.SaveAs Filename:="D:\¥Ø¿ý\  & range("c2")\" & Range("A2") & "-" & Format(Range("B2"), "yyyymmddhhss") & ".xlsm"

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-6-5 23:52 ½s¿è
ActiveWorkbook.SaveAs Filename:="D:\¥Ø¿ý\" & Range("A2") & "-" & Format(Range("B2"), "yyyymmddhhss") ...
starry1314 µoªí©ó 2015-6-4 17:10


ActiveWorkbook.SaveAs Filename:="D:\¥Ø¿ý\" & Range("c2") & "\" & Range("A2") & "-" & Format(Range("B2"), "yyyymmddhhss") & ".xlsm"

¦r¦ê¦X¨Ö®ÉÀ³ª`·N¥H¤U´XÂI :
1. "(Âù¤Þ¸¹) ¥²¶·¦¨¹ï, ¥B¨â­Ó " ¤¤¶¡¥]µÛ¦r¦ê¦Ó«DÅܼƩΫO¯d¦r.
2. ¬Û¾F¦r¦ê¶¡¥i¥Î & ¨Ó³s±µ¦¨¤@­Ó¦r¦ê

©³¤U¬O§Ú±`¥Îªº¤@¨Ç¦r¦ê³B²z©Î´ú¸Õ§Þ¥©:
1. ¦pªG¦r¦ê¤Óªø¤£©ö§PÂ_µ²ªG¬O§_¥¿½T,
¥i¥H©ó½á­È«á¨Ì¦¸ªþ¥[¦r¦êµ¹ÅܼƫK©ó°»¿ù,
¨Ò¦p¤W¦¡¥i¥H§ï¦¨ :
  1. Dim sStr$
  2. sStr= "D:\¥Ø¿ý\" & Range("c2")
  3. sStr= sStr &  "\" & Range("A2")
  4. sStr= sStr &  "-" & Format(Range("B2"), "yyyymmddhhss") & ".xlsm"
  5. ActiveWorkbook.SaveAs Filename:= sStr
½Æ»s¥N½X
2. ¤]¥i¥H¥Î _(¤@­Ó¥b§ÎªÅ¥Õ¤å¦r ³s±µµÛ ¤@­Ó¥b§Î©³½u¤å¦r) ¨Ó©î¦æ(¦ý¤£¥i¥H§â¦r¦ê¤À©î¨â¦æ),¨Ò¦p­ì¦¡§ï¦¨ :
  1. ActiveWorkbook.SaveAs Filename:="D:\¥Ø¿ý\" &  _
  2. Range("c2") & "\" & Range("A2") &  _
  3. "-" & Format(Range("B2"), "yyyymmddhhss") & ".xlsm"
½Æ»s¥N½X
³o¼Ë¤À©îµ¥¦P¥u¦³¤@¦æ«ü¥O(»P­ì¦¡ªº®ÄªG§¹¥þ¬Û¦P).
¦n³B¬O«K©ó«ü¥O§PŪ »P Á׶}³æ¦æ«ü¥Oªø«×­­¨î.

3. °£ÂÎ(Debug)®É¥i¥H§â¤¤Â_ÂI³]¦b¸Ó¦æ¨Ã°õ¦æ¦Ü¸Ó¦æ¼È°±,
±µµÛ«þ¨©¸Ó¦æ¶}±Ò "§Y®É¹Bºâ" µøµ¡,
¥ý¥´¤W¤@­Ó ? ¦A©ó¨ä¥k¤è¶K¤W¸Ó¦æ«ü¥O«á«ö¤U Enter «öÁä,
¬Ý¬Ý¥X¨Óªºµ²ªG¬O§_¥¿½T,
«ùÄò­×§ï ? «áªº¤º®eª½¨ìµ²ªG¥¿½T,
¦A±N¨ä§ó·s¨ìµ{¦¡¤¤§Y¥i.

TOP

¦^´_ 2# luhpro


        ½Ð°Ý§A©Ò¿×ªºÅ|¥[¦r¦ê¨Æ
sstr
sstr
sstr
·|Åܦ¨²Ä2­ÓsstrÄ~Äò±µµÛ²Ä¤@­Ósstr§¹¦¨«áªº¼Æ¾Ú Ä~Äò±µµÛ¤U¥h¶Ü??

·PÁ«ü¾É°£ÂΧޥ©....

TOP

¦^´_  luhpro
        ½Ð°Ý§A©Ò¿×ªºÅ|¥[¦r¦ê¨Æ
sstr
sstr
sstr
·|Åܦ¨²Ä2­ÓsstrÄ~Äò±µµÛ²Ä¤@­Óss ...
starry1314 µoªí©ó 2015-6-5 23:55

°²³] :
sStr="123"
sStr= sStr & "456"
sStr= sStr & "789"

«h°õ¦æ«á sStr= "123456789"

TOP

¦^´_ 4# luhpro


    ¤F¸Ñ~¯u¬O¦n¥Îªº§Þ¥© ¥i¥H¤@¨B¤@¨B°»¿ù,¦³®É¤@¾ã¦ê¯uªº«ÜÃø§ä¥X¿ù¦b­þ¸Ì

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD