View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Alfredo_CPA Alfredo_CPA is offline
external usenet poster
 
Posts: 45
Default Automatic Update links to web query

This code gives me an error message:
Worksheets("NFL Link").Range("J30").Select
I Can't figure out what is wrong...

--



"Excel.Instructor" wrote:

On Sep 16, 3:24 pm, Alfredo_CPA .(donotspam)
wrote:
1. Are there any way to Automatic Update links to web query.
Let say, I want to simulate clicking the refresh button every 60 seconds.

2. My web query is in sheet2 (showed as raw data). My usefull (already
manipulated data) with links to sheet 2 is in sheet1. I noticed the refresh
option is available just when I'm in sheet2. Are there any way to refresh the
web query from sheet1

--
I'm not a looser, I keep trying€¦


Alfredo-

Here is a macro that will do the job. You'll need to replace the
"B15" cell reference with any cell on your Sheet2 that contains data
from the web query. Basically, if you can right click that cell and
the Refresh option appears, it's usable in this macro.

Sub UpdateWeb()
Worksheets("Sheet2").Range("B15").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
End Sub

Regards,
Excel.Instructor (Ed2go.com/Advanced Excel)