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

[µo°Ý] Application.AskToUpdateLinks = False

¦^´_ 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-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

¥»©«³Ì«á¥Ñ 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

¦^´_ 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

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD