LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Web query causes excel crash!


Sent a file to your address shown
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"God Itself" wrote in message
...
Hi,

1. " " are already used.

2. i know the fix with "xlSpecifiedTables" but there is only 1 available
table from the given link.

try:

.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "1"

and excel still crashes...

The problem is that i cannot use download data from the URL while i could
download the same data previously (month ago).
Might they have changed on the site to prevent from data downloading?



Użytkownik "Don Guillett" napisał w wiadomości
...
2 problems.
1. You did NOT have " " around your url.
2. Crashed on me also (xl2003). I think it has to do with getting the
WHOLE
page and the graphics? See fix below to just get the data table.

3. When refreshing, do NOT add another fetch UNLESS you delete the first
one
and the defined name that goes along. Use the Refresh macro below,
especially if in a LOOP.

Sub getquery()
a =
"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
b = any_name_01
With Sheets("query").QueryTables.Add(Connection:=a,
Destination:=Sheets("query").Range("A1"))
.Name = b
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = False
.RefreshPeriod = 0

'.WebSelectionType = xlEntirePage
'.WebFormatting = xlWebFormattingNone

.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "9"

.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False 'ERROR LINE ???
End With

End Sub
Sub RefreshQuery()
With Sheets("Query").QueryTables(1)
.Connection = _

"URL;http://www.bankier.pl/inwestowanie/profile/wynikifinansowe/01NFI-jednostkowy-raport-kwartalny.html?offset=0"
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingNone
.WebTables = "9"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software


 
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
XL2007 crash using MS Query in vista 64 EddieO Excel Discussion (Misc queries) 0 July 13th 09 07:02 PM
Excel Crash when MS Query Add-in is enabled Mike@Syrris Excel Discussion (Misc queries) 0 February 23rd 06 03:50 PM
Excel Crash - Help! Delbert Excel Discussion (Misc queries) 13 December 13th 05 10:02 PM
Excel crash HELP! Eric Excel Programming 0 November 5th 04 03:34 PM
Excel Crash Seth[_3_] Excel Programming 1 October 31st 03 01:59 PM


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