LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to fix the coding?

Does anyone have any suggestions on how to fix the following codes?
Under the spreadsheet Summary, Cell A1 is equal to cell K14 in ADR
spreadsheet. When I run the following code, the formula in cell A1 [=ADR!K14]
for Summary spreadsheet change to the formula [=ADR!BJ14], I get no idea why
the referring location is changed.
Does anyone have any suggestions?
Thanks in advance for any suggestions
Eric

Sub ADR()
Dim qtEntry As QueryTable
Dim qryConnect As String
Dim anyRange As Range
Dim anySheet As Worksheet

Set anyRange = Sheets("ADR").Range("A1:" & _
Sheets("ADR").Range("A1").SpecialCells(xlLastCell) .Address)
On Error Resume Next ' errors if no querytable entry
anyRange.QueryTable.Delete
On Error GoTo 0
anyRange.ClearContents

qryConnect = "URL;http://www.editgrid.com/export/book/556471?type=html"
Set anySheet = Sheets("ADR")
With anySheet.QueryTables.Add(Connection:=qryConnect, Destination _
:=anySheet.Range("$A$1"))

.Name = "hsio070104"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With

End Sub

 
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 fix the coding? Eric Excel Worksheet Functions 4 June 20th 07 02:42 PM
coding maisy1 Excel Discussion (Misc queries) 1 August 6th 06 08:58 PM
Coding metaltecks Excel Discussion (Misc queries) 1 April 17th 06 10:12 PM
Coding for header jesmin Excel Discussion (Misc queries) 1 December 20th 05 04:03 PM
coding Hardy Excel Discussion (Misc queries) 1 February 22nd 05 04:58 PM


All times are GMT +1. The time now is 01:36 AM.

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"