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

¦p¦ó¦b«ü©w®É¶¡¦Û°Ê¦sÀɤÎÃö³¬EXCEL

¦p¦ó¦b«ü©w®É¶¡¦Û°Ê¦sÀɤÎÃö³¬EXCEL

½Ð±Ð¤j¤j¡A­n¦b¤U¤È3®É10¤À¦Û°Ê¦sÀɤÎÃö³¬EXCEL¡AÀ³¸Ó«ç¼Ë¼g¡AÁÂÁ¤j¤j!

¦^´_ 1# cdkee
http://forum.twbts.com/viewthread.php?tid=1657&extra=&page=1
  1. Sub Ex()
  2.     Application.OnTime "15:10", "AUTO_CLOSE"
  3. End Sub
  4. Sub AUTO_CLOSE()
  5.     ThisWorkbook.Save
  6.     Application.Quit
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ÁÂÁª©¤j«ü¾É!
¦pªG¦bÁôÂäu¨ã¦C®É¡AÀ³«ç¼Ë§ï¼g¡A¦AÁÂÁª©¤j±Ð±Â!
hidden.rar (12.87 KB)

TOP

¦^´_ 2# GBKEE


    ÁÂÁª©¤j´`´`µ½»¤¡A¤p½úªì¦¸§¹¦¨¥\½Ò¡A½Ðª©¤jÀË´ú¡AÁÂÁÂ!
hidden.rar (15.86 KB)

TOP

¦^´_ 4# cdkee
¤G¿ï¤@
ThisWorkbookªºµ{¦¡½X
  1. Private Sub Workbook_Open()
  2.    MsgBox "¶}±Ò Sub Workbook_Open µ{¦¡"
  3.   With Application
  4.     'ÁôÂà Ribbon(¥\¯à°Ï)
  5.     .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
  6.     .StatusBar = False
  7.     .CommandBars("Status Bar").Visible = False
  8.     .StatusBar = True 'False
  9.     .DisplayFormulaBar = False
  10.     .DisplayScrollBars = False
  11.     .Caption = "It's all gone!"
  12.     .ActiveWindow.DisplayHeadings = False
  13.     .ActiveWindow.DisplayWorkbookTabs = False
  14.     '±Nµøµ¡ª¬ºA³]¬°¤@¯ë
  15.     .WindowState = xlNormal
  16.     .Width = 250
  17.     .Height = 250
  18.   End With
  19.   Application.OnTime "08:22:56", "ThisWorkbook.EX"
  20. End Sub
  21. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  22.     With Application
  23.         'ÁôÂà Ribbon(¥\¯à°Ï)
  24.         .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
  25.         .CommandBars("Status Bar").Visible = True
  26.         .DisplayFormulaBar = True
  27.         .DisplayScrollBars = True
  28.         .Caption = "It's all gone!"
  29.         .ActiveWindow.DisplayHeadings = True
  30.         .ActiveWindow.DisplayWorkbookTabs = True
  31.         '±Nµøµ¡ª¬ºA³]¬°¤@¯ë
  32.         .WindowState = xlMaximized
  33.     End With
  34.     Application.Quit
  35. End Sub
  36. Private Sub EX()
  37.     ThisWorkbook.Close 1
  38. End Sub
½Æ»s¥N½X
Moduleªºµ{¦¡½X
  1. Sub AUTO_OPEN()
  2.      With Application
  3.         'ÁôÂà Ribbon(¥\¯à°Ï)
  4.         .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
  5.         .StatusBar = False
  6.         .CommandBars("Status Bar").Visible = False
  7.         .StatusBar = True 'False
  8.         .DisplayFormulaBar = False
  9.         .DisplayScrollBars = False
  10.         .Caption = "It's all gone!"
  11.         .ActiveWindow.DisplayHeadings = False
  12.         .ActiveWindow.DisplayWorkbookTabs = False
  13.     '±Nµøµ¡ª¬ºA³]¬°¤@¯ë
  14.         .WindowState = xlNormal
  15.         .Width = 250
  16.         .Height = 250
  17.     End With
  18.     Application.OnTime "23:36", "AUTO_CLOSE"
  19. End Sub
  20. Sub AUTO_CLOSE()
  21.     With Application
  22.         'ÁôÂà Ribbon(¥\¯à°Ï)
  23.         .ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
  24.         .CommandBars("Status Bar").Visible = True
  25.         .DisplayFormulaBar = True
  26.         .DisplayScrollBars = True
  27.         .Caption = "It's all gone!"
  28.         .ActiveWindow.DisplayHeadings = True
  29.         .ActiveWindow.DisplayWorkbookTabs = True
  30.     '±Nµøµ¡ª¬ºA³]¬°¤@¯ë
  31.         .WindowState = xlMaximized
  32.     End With
  33.     ThisWorkbook.Save
  34.     Application.Quit
  35. End Sub
½Æ»s¥N½X

TOP

¦^´_ 5# GBKEE


   ÁÂÁ ª©¤jªº¦h¤è±Ð¾É¡A¤p½ú²`³Q·P°Ê!
½Ð±Ðª©¤j:
ThisWorkbookªºµ{¦¡½X¤¤...
°Ý1) Application.OnTime "08:22:56", "ThisWorkbook.EX" <---¬O¦]¬°Private Sub EX() ¦bThisWorkbook¤¤?
°Ý2) Private Sub EX() <---¦b³o­Ó¨Ò¤l¥ÎPrivate¦³¨S¦³¯S§O·N«ä?
°Ý3) Private Sub Workbook_BeforeClose(Cancel As Boolean)»PPrivate Sub Workbook_BeforeClose()¦³¤°»ò¤À§O?
°Ý4) ThisWorkbook.Save <---¬O§_º|¼g³o­Ó?
°Ý5) ThisWorkbook.Close 1¬O§_«üÃö³¬ÀɮצӤ£Ãö³¬EXCEL?'Close'¤§«áªº¼Æ¦r¦³¤°»ò·N«ä?

Moduleªºµ{¦¡½X¤¤...
°Ý6) Sub AUTO_OPEN()...¤£¥ÎPrivate Sub Workbook_Open()¬O¦]¬°¦bModuleªºµ{¦¡¤£¥i¥ÎPrivate?©Î¦³¨ä¥L¦]¯À?

°Ý7) ¤p½ú¤´µM¤À¤£²M¡A¦ó®É¥ÎSheet/ThisWorkbook¡A¦ó®É¥ÎModule?
¤p½ú°ÝÃD¦h¦h¡A·Ð½Ðª©¤j¤Þ¾É¡AÁÂÁÂ!

TOP

¦^´_ 6# cdkee
°Ý1) ¨S¿ù   Application.OnTime "08:22:56", "ThisWorkbook.EX"
µ{§Ç¦b ThisWorkbook,Sheet1,Sheet2 ....µ¥ ª«¥ó¼Ò²Õ »Ý«ü©ú, µ{§Ç¦b¤@¯ë¼Ò²Õ(Module)¤º«h¤£»Ý«ü©úµ{§Ç©Ò¦bªº¼Ò²Õ.
°Ý2) Private Sub EX() <---¦b³o­Ó¨Ò¤l¥ÎPrivate¦³¨S¦³¯S§O·N«ä?  
Sub EX() => Public Sub EX(),¬O¤½¥Îªº¨ä¥Lª«¥ó¼Ò²Õ©Î ¤@¯ë¼Ò²Õ(Module)³£¥i¥H¨Ï¥Îªº.
Private Sub EX() ¬O¨p¥Îªº,¨ä¥Lª«¥ó¼Ò²Õ©Î ¤@¯ë¼Ò²Õ(Module) µLªk¨Ï¥Î.
¨Ò¦p¦³Private Sub EX() ¤Î Sub Example() ¨âµ{§Ç ¦b«ü¥O [¤u¨ã]->[¥¨¶°] ¥u¥i¥H§ä¨ìSub Example()
°Ý3) Private Sub Workbook_BeforeClose(Cancel As Boolean)»PPrivate Sub Workbook_BeforeClose()¦³¤°»ò¤À§O?
Private Sub Workbook_BeforeClose(Cancel As Boolean) ¬O©óÃö³¬Workbook®Éªº¤º«ØIJ°Ê¨Æ¥ó
Private Sub Workbook_BeforeClose()¦]»P¤W­z¤º«ØIJ°Ê¨Æ¥ó¦WºÙ¬Û¦P,¦p¦bThisWorkbookª«¥ó¼Ò²Õ¤º¬O¤£¤¹³\ªº.
°Ý4) ThisWorkbook.Save <---¬O§_º|¼g³o­Ó?   ¬Ý¤£©ú¥Õ§Aªº·N«ä
°Ý5) ThisWorkbook.Close 1    ¥¿¦¡¼gªk ThisWorkbook.Close SaveChanges:=True   (VBA   False=0, True=1)
°Ý6) Sub AUTO_OPEN()...¤£¥ÎPrivate Sub Workbook_Open()¬O¦]¬°¦bModuleªºµ{¦¡¤£¥i¥ÎPrivate?©Î¦³¨ä¥L¦]¯À?
Private Sub Workbook_Open() ¬OWorkbook¶}±Ò®Éªº¤º«ØIJ°Ê¨Æ¥ó,©ñ©óModuleªºµ{¦¡½X¤¤,¤£·|©óÀɮ׶}Àɮɦ۰ʰõ¦æ.
°Ý7) ¤p½ú¤´µM¤À¤£²M¡A¦ó®É¥ÎSheet/ThisWorkbook¡A¦ó®É¥ÎModule?
     ¦h¦h½m²ß«á·|¿Ä·|³e³qªº!!

TOP

¦^´_ 7# GBKEE


    ¥ýÁÂÁª©¤j¸Ô²ÓÁ¿¸Ñ¡A¤p½ú¦b¾Ç²ß¤¤¡C

TOP

§Ú¤]¦³¾Ç¨ì¤@¨Ç¤âªk¤F¡C
xxx.show 0 ©Î  1   ¡A¤]¬O¤@¼Ëªº·N«ä¡C
­É¿ú¤£ÁÙ¡A¤~¬O¤ý¹D

TOP

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