LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
Alarmbloke
 
Posts: n/a
Default Automatic Web Queries

Hi,

Have come across a new problem,

Have set up a macro thanks to Pinmaster and Ron Coderre which does automatic
web updates based on cell data see below

Dim URL2Use As String
URL2Use = "URL;" & Sheet1.Range("D1").Value

With ActiveSheet.QueryTables.Add(Connection:=URL2Use, _
Destination:=Range("A10"))
.Name = "AutoLink"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "2"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

This works in a new workbook, but doesn't work when I add a identical page
and macro to an existing workbook,

Have had Runtime 1004 errors, invalid web address errors and background
refresh errors, yet it works fine in a dedicated workbook??

Any thoughts
 
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 to do automatic Web Queries?? Alarmbloke Excel Discussion (Misc queries) 4 December 4th 05 08:28 PM
options to update automatic links Werner Rohrmoser Excel Worksheet Functions 0 November 10th 05 12:58 PM
How can I find automatic links in an Excel-sheet? Tobias Excel Discussion (Misc queries) 4 August 4th 05 09:02 AM
automatic query refresh sid Excel Discussion (Misc queries) 1 March 14th 05 09:02 PM
automatic query refresh sid Excel Discussion (Misc queries) 0 March 14th 05 08:55 AM


All times are GMT +1. The time now is 05:59 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"