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

[µo°Ý] ¦sÀɮɡA¦Û°Ê¥[¤J¦sÀɮɪº¤é´Á

[µo°Ý] ¦sÀɮɡA¦Û°Ê¥[¤J¦sÀɮɪº¤é´Á

½Ð±Ð¦U¦ì°ª¤â
¤§«e¤p§Ì¦b½׾§ä¨ì¤@½g¸ê®Æ
http://gb.twbts.com/index.php?topic=660.msg2935#msg2935
  1. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
  2. Cancel = True
  3. Me.Save
  4. Me.SaveCopyAs Me.Path & "\" Replace(Me.Name,".xls",Format(Date,"emmdd") & ".xls")
  5. End Sub
½Æ»s¥N½X
¦ý¬O²{¦b¤£¯à¥Î¤F
¥X²{¥²¶·¬O³¯­zµ²§Àªº¿ù»~
½Ð°Ý¬Oreplaceªº¥Îªk¦³§ï¶Ü?

¤p§Ì¬O¥Î2007ª©

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-11-3 14:59 ½s¿è

¦^´_ 1# downling
¤Ö¤F¤@­Ó&
Me.SaveCopyAs Me.Path & "\" & Replace(Me.Name, ".xls", Format(Date, "emmdd") & ".xls")

¥ÎFULLNAME·|²M·¡ÂI
Me.SaveCopyAs Replace(Me.FullName, ".xls", Format(Date, "emmdd") & ".xls")
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

·PÁÂHsiehª©¤j
¥i¥H¥Î¤F

TOP

¦^´_ 2# Hsieh

§Ú·Q¦A°Ý¤@¤U
¤§«eªºvba¥²»Ý¬°¤@±a¥¨¶°ªºxlsmÀɤ~¯à¨Ï¥Î

­Y¬O¥Î¤@¯ëªºxlsÀɪºvba­n¦p¦ó¼g©O?

TOP

¦^´_ 4# downling
¨º¥u¬Oª©¥»°ÝÃD
³o»yªk2003ª©¾A¥Î
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 5# Hsieh

Hsieh ª©¤j±z»~·|¤F

¤W­±ªºµ{¦¡2007¬O¥i¥H¨Ï¥Îªº
¦ý¬OÀÉ®×¥²»Ý¬°¤@­Ó±a¥¨¶°ªºÀɮפ]´N¬O°ÆÀɦW¬°xlsm

²{¦b¤p§Ì¦]¤u§@ªº»Ý­n¡A¥²»Ý±`±`§ó·s¤£¦PªºÀɮסA¥Ñ©ó¬O¤£¦P¤H©Òµ¹ªº¡A
©Ò¥H·Q­n°µ¦¨¤@³q¥Îªº¥¨¶°©ÎVBA
ÅýµL¥¨¶°ªºÀɮס]¤]´N¬O¤@¯ëªºXLSÀÉ¡^¤]¯à¤è«Kªº¥[¤W¤é´Á

¤p§Ì¦³¦bºô¸ô¤W§ä¨ìÃþ¦üªº
¦ý¬O¸ô®|¬O³]¦nªº
·Q»¡­n«ç»ò­×§ï¦¨­ì¨ÓªºÀɮשҦbªº¸ê®Æ§¨
  1. Sub TD()
  2. ¡@ mypath = "C:\Documents and Settings\Administrator\®à­±\"
  3. ¡@ myfile = "NN" & Format(Date, "emmdd") & ".xls"
  4. ¡@ Sheets(Array("Sheet2", "Sheet3")).Copy
  5. ¡@ ActiveWorkbook.SaveAs mypath & myfile
  6. ¡@ Workbooks(myfile).Close
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 6# downling


    mypath = ThisWorkbook.Path & "\"
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

­è¤S­×§ï¤F¤@¤U
²{¦bvba·|§â"§AªºÀɦW.xlsx"¥t¦s·sÀɬ°"§AªºÀɦW_yyyymmdd.xlsx"
½Ð«ü±Ð
  1. Sub TD()

  2.    myname = Application.ActiveWorkbook.FullName
  3.    Application.DisplayAlerts = False
  4.    ActiveWorkbook.SaveCopyAs Replace(myname, ".xls", "_" & Format(Date, "yyyymmdd") & ".xls")
  5.    Application.DisplayAlerts = True
  6.    
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# downling

¨º§A­nªº»Ý¨D¥²¶·»¡©ú²M·¡ªü
³o¥u¤£¹L¬O¦r¦ê´À´«°ÝÃD
§Aªº³Ì²×ÀɦW¦r¦ê­n±o¨ì«ç¼Ë©O?
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 9# Hsieh

¤£¦n·N«ä
Åý±z»~·|¤F

¤p§Ì»Ý­nªº¬O®³¨ìÀɮ׫á
¨Ï¥Îvba¥h­×§ïÀɦW(¥[¤W©Î­×§ï¦¨¤µ¤Ñ¤é´Á)«á¥t¦s·sÀÉ
ex:aaa.xlsx ---> aaa_20111110.xlsx or bbb_20111005.xlsx ---> bbb_20111110.xlsx

¤W­±ªºµ{¦¡À³¸Ó¥u¾A¥Î©ó¨S¦³¤é´ÁªºÀɦW.....

¦Ü©ó¤W¤W­±¨º­Óµ{¦¡«h¬O®³¨Ó°Ñ¥Î¤@¤U¥Lªº«äªk¦Ó¤wʨ

TOP

        ÀR«ä¦Û¦b : ­n§åµû§O¤H®É¡A¥ý·Q·Q¦Û¤v¬O§_§¹¬üµL¯Ê¡C
ªð¦^¦Cªí ¤W¤@¥DÃD