LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default external data works in 2003 not in 2000

I have this code, works great in 2003, I open the file in 2000 and the macro
does not access txt file on website, it goes right to the on error message.
If I manually refresh data Data | Refresh Data it will perform the update.
Why does it work ok in 2003 and not 2000?
'
Sub CheckUpdate_Macro()
Dim strCompleteURL As String

strCompleteURL = "URL;http://www.mywebsite.com/update.txt" 'I had a 3 part
url, I thought may have been problem so I combined
Sheets("UPDATE").Select
Sheets("UPDATE").Unprotect "1234"
On Error GoTo ErrorMessage
With ActiveSheet.QueryTables.Add(Connection:= _
strCompleteURL, Destination:=Range("A1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlPasteDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With


Exit Sub
ErrorMessage:
MsgBox "The update failed, make sure you are " & _
"connected to the internet."

End Sub
'
Thanks!
Mike
 
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
VB Code works in 2000, but not 2003 [email protected] Excel Programming 2 June 21st 06 09:13 AM
Why 'Unprotect' works for 2003 but not 2000?! OrientalPearl Excel Programming 13 April 3rd 06 01:44 AM
#VALUE! error: vlookup works in Excel 2000 but not 2003 Nick Ersdown Excel Discussion (Misc queries) 6 November 25th 05 12:23 PM
Data from Excel 2000 Worksheet with external links is not displayed when opened in Excel 2003 Rich Rodberg Links and Linking in Excel 1 October 21st 05 07:53 AM
Simple Macro, works in Excel 2002, 2003 but won't work in 2000 DJA[_2_] Excel Programming 5 September 28th 05 05:10 PM


All times are GMT +1. The time now is 07:44 AM.

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

About Us

"It's about Microsoft Excel"