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

[µo°Ý] ¦³Ãö±j¨îÃö³¬EXCEL¤£¦sÀÉ°ÝÃD

[µo°Ý] ¦³Ãö±j¨îÃö³¬EXCEL¤£¦sÀÉ°ÝÃD

¦pªG¨Ï¥Î
ThisWorkbook.Close (False)     'Ãö³¬²{¦æªº¬¡­¶Ã¯True=Àx¦sÅܧó¤£Äµ§i,False=¤£Àx¦sÅܧó¤£Äµ§i
¥u¯àÃö³¬ÀɮסAµLªkÃö³¬excel

¦pªG¨Ï¥Î
Application.Quit            'Ãö³¬EXCEL
¦p¦³Åܧó¸ê®Æ¡A´N·|¥X²{¬O§_¦sÀɹï¸Ü®Ø

½Ð°Ý§Ú§Æ±æª½±µÃö³¬excel¡A¦Ó¥B¤£§Æ±æ¦sÀÉ¡A¥B¤£­n¥X²{¹ï¸Ü®Ø
½Ð±Ð¸Ó¦p¦ó³B²z¡AÁÂÁÂ:)

¦^´_ 1# ltc
ThisWorkbook ªº¹w³]µ{§Ç (¬¡­¶Ã¯Ãö³¬¨Æ¥ó)
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.     Me.Close 0
  3. End Sub
½Æ»s¥N½X

TOP

GBKEE ª©¥D±z¦n¡G
§Ú±Nµ{¦¡½X©ñ¤JThisWorkbook¤º¡A³o¼Ë¹ï¶Ü?

°õ¦æµ²ªGÁÙ¬OµLªkÃö³¬execl

§Ú·Q­nÃö³¬¬¡­¶Ã¯¤Îexeclµ{¦¡
ÁÂÁÂ

TOP

´N¬O¥ýÃö¬¡­¶Ã¯¤£Àx¦s,¦AÃöÀ³¥Îµ{¦¡
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.     Me.Close 0
  3.    Application.Quit
  4. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ FAlonso ©ó 2010-12-15 13:43 ½s¿è

¥H¤Uªºcode¬O§ï¨}ª©
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2. ActiveWorkbook.Saved = True
  3. Application.Quit
  4. End Sub
½Æ»s¥N½X
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

·PÁ¨â¦ì¤j¤jªº«ü¾É¡A³o¥¿¬O§Ú»Ý­nªº
«D±`©êºp¡A²{¦b¤~¦^ÂÐ

¸É¤W§Ú­è­è§äªº¸ê®Æ

Workbook.Saved ÄÝ©Ê
¦pªG«ü©w¬¡­¶Ã¯±q¤W¦¸Àx¦s¦Ü¤µ¥¼°µ¹LÅܧó¡A«h¥»ÄݩʭȬ° True¡C¥iŪ¼gªº Boolean¡C
»yªk
¹Bºâ¦¡.Saved
¹Bºâ¦¡   ¥Nªí Workbook ª«¥óªºÅܼơC
³Æµù
¦pªG¬¡­¶Ã¯±q¥¼¶i¦æÀx¦s¡A«h¨ä Path ÄÝ©Ê·|¶Ç¦^ªÅ¦r¦ê ("")¡C
¦pªG­nÃö³¬¬Y­Ó¤wÅܧ󪺬¡­¶Ã¯¡A¦ý¤S¤£·QÀx¦s¥¦©Î¤£·Q¥X²{Àx¦s´£¥Ü¡A¥i±N¦¹Äݩʳ]©w¬° True¡C

TOP

¤w¾Ç·|
·PÁ¦U¦ì¤j¤j¼ö¤ß±Ð¾É

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD