View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
slimswol[_8_] slimswol[_8_] is offline
external usenet poster
 
Posts: 1
Default call multiple macros in workbook_open?


Hey... I changed a few lines of code and now it deletes all of the
QueryTables but does not re - run the macros that are called at the
bottom of the code.



Private Sub Workbook_Open()

Dim ws As Worksheet
Dim qt As QueryTable

For Each ws In ThisWorkbook.Worksheets
For Each qt In ws.QueryTables

'Clear QT data
qt.ResultRange.ClearContents
'Delete QT named range from workbook

'Delete query table
qt.Delete

Next qt
Next ws

Call URL_Sheet1_Query
Call URL_Sheet2_Query
Call URL_Sheet3_Query
Call URL_Sheet4_Query


End Sub


--
slimswol
------------------------------------------------------------------------
slimswol's Profile: http://www.excelforum.com/member.php...o&userid=32014
View this thread: http://www.excelforum.com/showthread...hreadid=520282