LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
bob bob is offline
external usenet poster
 
Posts: 16
Default refresh query

i am trying to refresh a query every 10 min.
using the .RefreshPeriod = 10 in the query loop doesn't redue all of the
macro formatting that follows query so i was wondering if refresh could be
used in a sub to run the main macro. something like this

sub refresh()
Application.Run "'TEST.XLS'!GetData"
..RefreshPeriod = 10
End Sub

or how would i automate running the macro.

this is the query loop in main macro
Workbooks.Add
With ActiveSheet.QueryTables.Add(Connection:=connectURL ,
Destination:=Range("A1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.PostText = "TICKER=" & Symbol
.refresh BackgroundQuery:=False 'DL text data
.RefreshPeriod = False 'no refresh
.SaveData = True
End With

thanks


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I 'Enable Automatic Refresh' for Query Refresh by default Anand Deshpande Setting up and Configuration of Excel 0 December 10th 06 04:47 AM
Query parameter "refresh when value changes" doesn't refresh - why Texas_Toast Excel Discussion (Misc queries) 0 January 4th 06 03:32 PM
Query Refresh-Enable Automatic Refresh Dialogue Box Terri Excel Discussion (Misc queries) 0 May 6th 05 08:21 PM
Excel does not close from VB!! (when i refresh Refresh query with BackgroundQuery:=False) Anant[_2_] Excel Programming 1 August 6th 03 04:22 AM
Web Query fail to Refresh All but individual refresh is ok Karyn Mak Excel Programming 2 July 17th 03 09:30 AM


All times are GMT +1. The time now is 06:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"