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

[µo°Ý] Application.AskToUpdateLinks = False

[µo°Ý] Application.AskToUpdateLinks = False

Private Sub Workbook_Open()
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
ThisWorkbook.UpdateLinks = xlUpdateLinksAlways
End Sub
Book1.rar (34.76 KB)
Application.AskToUpdateLinks = False
³oÀ³¸Ó¬OÀɮתº§ó·s³sµ²¦b¥Îªº§a??
web ¬d¸ßªº§ó·s¤]¬O³o­Ó¶Ü?§Ú¸Õ¹LµL®Ä (¤@¶}ÀÉ´N¦Û°Ê§ó·s¡A¤£­n¸ß°Ý)

¦^´_ 1# t8899

¨ú®ø³o¿ï¶µ





   
  1. Private Sub Workbook_Open()
  2. MsgBox "test"
  3. Application.DisplayAlerts = False
  4. Application.AskToUpdateLinks = False
  5. ThisWorkbook.UpdateLinks = xlUpdateLinksAlways
  6. Sheet5.QueryTables(1).Refresh 0   '¥[¤W³o¦æ
  7. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-25 10:06 ½s¿è
¦^´_  t8899

¨ú®ø³o¿ï¶µ
GBKEE µoªí©ó 2014-6-25 09:41

ÁÂÁ¡A½Ð°Ý Sheet5.QueryTables(1).Refresh 0 ³o¦p¦ó½Ķ?

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-25 10:49 ½s¿è
¦^´_  t8899

¨ú®ø³o¿ï¶µ
GBKEE µoªí©ó 2014-6-25 09:41

³øºp¡A°ÝÃD¤S¨Ó¤F!
§Ú³oÀɮסA¬O¤£·Q¥X²{¸ß°Ýµøµ¡¡Aª½±µ§ó·s
¦ý§Ú¦b¶}¥t¤@ÀɮקÚÓý·Q­nÅý¥¦¸ß°Ý,
§Ú·Q³oÃöÁäÀ³¸Ó¦b©óApplication.AskToUpdateLinks = False ³o¶}Ãö
³o¶}Ãöµ¥©ó ¿ï¶µ=>½s¿è==>¦Û°Ê§ó·s³sµ²
§Ú§âApplication.AskToUpdateLinks = true ©ñ¦b ¥t¤@ÀɮסA¤S³y¦¨­ì¨Ó°ÝÃD
¦p¦óÅý¨âªÌ³£¯à­ÝÅU¨ì! ??

TOP

¦^´_ 4# t8899
  1. RefreshOnFileOpen ÄÝ©Ê ¦pªG¨C¦¸¶}±Ò¬¡­¶Ã¯®É¡A¼Ï¯Ã¤ÀªRªí§Ö¨ú°O¾ÐÅé©Î¬d¸ßªí·|¦Û°Ê§ó·s«h¬° True¡C¹w³]­È¬° False¡CŪ/¼g Boolean¡C
½Æ»s¥N½X
QueryTables ¦p³]©w.RefreshOnFileOpen = True
  1. Private Sub Workbook_Open()
  2. Application.AskToUpdateLinks = False
  3. ThisWorkbook.UpdateLinks = xlUpdateLinksNever  
  4. µ{§Ç¤W,³o¨Çªº³]©w¬OµL®Ä
½Æ»s¥N½X
§A·Q­nªº¬O³o¼Ë¶Ü
  1. Private Sub Workbook_Open()   
  2.     If LCase(Me.Name) = "book1.xls" Then
  3.         If MsgBox("¶}±Ò¥~³¡§ó·s?", vbYesNo) = vbYes Then
  4.             Sheet5.QueryTables(1).Refresh BackgroundQuery:=False
  5.         End If
  6.     ElseIf LCase(Me.Name) <> "book1.xls" Then
  7.         Sheet5.QueryTables(1).Refresh BackgroundQuery:=False
  8.     End If
  9. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-26 06:52 ½s¿è
¦^´_  t8899 QueryTables ¦p³]©w.RefreshOnFileOpen = True§A·Q­nªº¬O³o¼Ë¶Ü
GBKEE µoªí©ó 2014-6-26 05:28


Application.AskToUpdateLinks = False(TRUE)
§Ú¸Õ¹L,³o¶}Ãö­ì¹w³]¤£¬OŪ¶i¨Ó°¨¤W¥Í®Ä¡A­n¦sÀɸõ¥X¦A¶i¨Ó¤~¥Í®Ä
¨ì ¿ï¶µ=>½s¿è==>¦Û°Ê§ó·s³sµ² ´Nª¾¹Dª¬ªp
¦pªG°¨¤W¥Í®Ä¥u­n§âApplication.AskToUpdateLinks = False(TRUE) ©ñ¦b.OPEN´N¨S°ÝÃD¤F

§ó·s¥]¬A¤º³¡¥~³¡
A.XLS  ==> ¶}ÀÉ¡A­n¸ß°Ý(­n¤£­n§ó·s)
B.XLS  ==> ¶}ÀÉ¡A¤£­n¸ß°Ý(ª½±µ§ó·s)

§Ú§â¤U­±¦¹¬q©ñ¦b B.XLS
Private Sub Workbook_Open()
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
ThisWorkbook.UpdateLinks = xlUpdateLinksAlways
Sheet5.QueryTables(1).Refresh 0   '¥[¤W³o¦æ
END SUB
¶}«á¦sÀÉŪA.XLS
A.XLS  ¤]¬O¨S¸ß°Ý¡Aª½±µ§ó·s
¦pªG¦bA.XLS ©ñ¤J Application.AskToUpdateLinks = TURE
¤£·|°¨¤W¥Í®Ä¡A¦sÀɸõ¥X¦A¶i¨Ó¤~·|¥Í®Ä
±µ¤U¨Ó¡A¦^ÀY¦A¥´¶}B, (¤S¥X²{­n¤£­n§ó·sªº¸ß®§¤F(¦]¬°¤w³QA§ó§ï¬° TRUE))
B ­n¦A¦sÀÉ¡A¦A¶}Àɤ~¤£·|¥X²{´£¥Üªº°T®§

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-6-28 05:30 ½s¿è

¦^´_ 6# t8899


   
¦^ÀY¦A¥´¶}B, (¤S¥X²{­n¤£­n§ó·sªº¸ß®§¤F(¦]¬°¤w³QA§ó§ï¬° TRUE))

A.XLS ThisWorkbook¼Ò²Õ¥[¤W ¸Õ¸Õ¬Ý
  1. Private Sub Workbook_BeforeClose(Cancel As Boolean)
  2.     Application.AskToUpdateLinks = False
  3. End Sub
  4. Private Sub Workbook_WindowDeactivate(ByVal Wn As Window)
  5.      Application.AskToUpdateLinks = False
  6. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ t8899 ©ó 2014-6-28 07:08 ½s¿è
¦^´_  t8899
A.XLS ThisWorkbook¼Ò²Õ¥[¤W ¸Õ¸Õ¬Ý
GBKEE µoªí©ó 2014-6-28 05:27


¦¹¨Ò Workbook_BeforeClose  ¸ò auto_close À³¸Ó¨S¤°®t§O
³o¤§«e§Ú¤w¥Îauto_close ¸Õ¹L,AÃöÀÉ«e³]¬°Application.AskToUpdateLinks = False
«h¸õ¥X«á¦A¶}BÀÉ ¦³®Ä¡A¦ý¹ïAÀɵL®Ä (AÀɬO­n¸ß°Ý)
excel ·|¥ýŪ ¿ï¶µ=>½s¿è==>¦Û°Ê§ó·s³sµ²³o¶}Ãö
¦AŪ©Ò¿ïªºÀÉ®×
Application.AskToUpdateLinks =>±N¦¹¶}Ãö³]¬°enable ©Îdisable

TOP

¦^´_ 8# t8899
¦ý¹ïAÀɵL®Ä (AÀɬO­n¸ß°Ý)
½Ð»¡¤@¤U§Aªº¬yµ{
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_  t8899
½Ð»¡¤@¤U§Aªº¬yµ{
GBKEE µoªí©ó 2014-6-28 09:11

§Ú¦A¸Ô²Ó´ú¸Õ¦p¤U
A ¸ò  B ¨S°ÝÃD  (¬Ò¤@¯ëWEB³sµ²)
¦ý
A1 ¸ò B   (A1¦³°ÝÃDA1¬°DDE³sµ², ­n¸ß°Ý(¨S¥X²{¸ß°Ýµøµ¡)
¦pªþÀÉ teMP.rar (46.77 KB)

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD