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

Ãö©ó¤u§@­¶¥kÁä­«·s¾ã²z

Ãö©ó¤u§@­¶¥kÁä­«·s¾ã²z

¦p¼ÐÃD¡GÃö©ó¤u§@­¶¥kÁä­«·s¾ã²z

·Q¦b³o¸Ì½Ð±Ð¦U¦ì¤j¤j

°²¦p§Ú¦³3­Ó¤u§@ªí¡A¦b¤u§@ªí¤W«ö¥kÁä­«·s¾ã²z¡A­n¦p¦óª¾¹D¤w¸g§ó·s§¹²¦?©Î§ó·s¥¢±Ñ?

§¹¦¨¤§«á´«¤U­Ó¤u§@ªí©O?

³Â·Ð¦U¦ì¤j¤j«ü±Ð~·P®¦!

¦^´_ 1# EGBT
¸Õ¸Õ¬Ý
ThisWorkbook¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Public MSG As String
  3. '¦bWorkbook¥ô¤@¤u§@ªí¤W«ö¥kÁä "ªº¹w³]¨Æ¥ó
  4. Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, ByVal Target As Range, Cancel As Boolean)
  5.     Cancel = True  '¤£Åã¥Ü¤u§@ªí¤W«ö¤U¥kÁä©ÒÅã¥Ü¥\¯àªí
  6.     EX
  7. End Sub
  8. Private Sub EX()   ' §ó·s¥~³¡¬d¸ßªºµ{¦¡
  9.     Dim Sh As Worksheet, q As QueryTable
  10.     Dim Sh_Table As New Class1 '  Class1 ª«¥óÃþ§O¼Ò²Õªº¦WºÙ
  11.     MSG = ""
  12.     For Each Sh In Sheets(Array("Sheet1", "Sheet2", "Sheet3")) '°²¦p§Ú¦³3­Ó¤u§@ªí
  13.    'For Each Sh In Sheets '©Ò¦³¤u§@ªí
  14.         If Sh.QueryTables.Count > 0 Then
  15.             For Each q In Sh.QueryTables
  16.                 Set Sh_Table.XQueryTable = q  '¬d¸ßªí ³]¬° ª«¥óÃþ§Oªºª«¥ó
  17.                 q.Refresh False
  18.             Next
  19.         End If
  20.     Next
  21.     If MSG <> "" Then
  22.         MsgBox MSG
  23.     Else
  24.         MsgBox Me.Name & " ¨S¦³¥~³¡¬d¸ß"
  25.     End If
  26. End Sub
½Æ»s¥N½X
ª«¥óÃþ§O¼Ò²Õ[Class1]ªºµ{¦¡½X
  1. Option Explicit
  2. Public WithEvents XQueryTable As QueryTable
  3. Private Sub XQueryTable_AfterRefresh(ByVal Success As Boolean)
  4.     ThisWorkbook.MSG = ThisWorkbook.MSG & IIf(ThisWorkbook.MSG <> "", vbLf, "") & XQueryTable.Parent.Name & "-" & XQueryTable.Name & "§ó·s " & IIf(Success, "¦¨¥\", "¥¢±Ñ")
  5. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE


    ·PÁ¤j¤jªº¤À¨É...¸Ü»¡¤j¤j...±z¬°¤°»ò³£·|§¹¾ã¦a¦^´_...

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD