There are some codes that might work. Complete the first Workbook_Open-/Workbook_BeforeClose - Events with these lines:
Code:
Private Sub Workbook_Open (Cancel As Boolean)
Call Terminate_Class
End Sub
Private Sub Workbook_Open ()
Call Init_Class
End Sub
Then on a standard module use the following code:
Code:
Option Explicit
Public gblnRefreshInProgress As Boolean
As a private lobjQueryTableClass clsQueryTable
Public Sub Init_Class ()
Set lobjQueryTableClass = New clsQueryTable
Set lobjQueryTableClass.prpQueryTable = Tabelle1.QueryTables
End Sub
Public Sub Terminate_Class ()
Set lobjQueryTableClass = Nothing
End Sub
Bookmarks