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

½Ð°Ý¦U¦ì¥ý¶i§Úªºµ{¦¡¦³¿ù¶Ü?¬°¦ó·|¤@ª½¥X²{¿ù»~

½Ð°Ý¦U¦ì¥ý¶i§Úªºµ{¦¡¦³¿ù¶Ü?¬°¦ó·|¤@ª½¥X²{¿ù»~

¥»©«³Ì«á¥Ñ dafa ©ó 2013-7-11 01:31 ½s¿è
  1. Private Sub Workbook_AfterSave(ByVal Success As Boolean)
  2. Application.DisplayAlerts = False
  3. If ¤u§@ªí1.[a2] = 1 Then
  4. ¤u§@ªí1.[a2] = 2
  5. ChDir "\\dumpling\supplychain$\01_Logistics\01_Shop Floor\²Ä¤TÃþ¤@¯ëÃþ(«O¦s´Á¤G¦~)"
  6.          ActiveWorkbook.SaveAs Filename:="\\dumpling\supplychain$\01_Logistics\01_Shop Floor\²Ä¤TÃþ¤@¯ëÃþ(«O¦s´Á¤G¦~)\°ï°ª¾÷¥æ±µªí.xls", _
  7.          FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
  8.         ReadOnlyRecommended:=False, CreateBackup:=True

  9. End If
  10. Application.DisplayAlerts = True
  11. ¤u§@ªí1.[a2] = ""
  12. End
  13. End Sub

  14. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
  15. Application.DisplayAlerts = False
  16. ChDir "\\csgh212rg07\·s¼W¸ê®Æ§¨"

  17. un = Application.UserName
  18. sfn = Year(Date) & Month(Date) & Day(Date) & un & Hour(Now) & Minute(Now) & Second(Now)
  19. If ¤u§@ªí1.[a2] = "" Then
  20. ¤u§@ªí1.[a2] = 1
  21.     ActiveWorkbook.SaveAs Filename:="\\csgh212rg07\·s¼W¸ê®Æ§¨\" & sfn & ".xls", _
  22.         FileFormat:=xlExcel8, Password:="", WriteResPassword:="", _
  23.         ReadOnlyRecommended:=False, CreateBackup:=True

  24. End If
  25. End Sub
½Æ»s¥N½X

¬°¤°»ò¨C¦¸°õ¦æ³£·|¥X²{¤U­±ªº¿ù»~(¦ýÁÙ¬O¦³¦sÀÉ)

¦^´_ 1# dafa
§A¬°¦ó¤£¥Î
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    ....
End Sub
¨Ó³B²z Excel ªºÃö³¬«eªº¤@¤Á§@·~¡H

TOP

·PÁÂC¤jªº¦^ÂÐ
±z¯u¬O¤@»yÅå¿ô¹Ú¤¤¤Hªü~

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD