[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: TA in excel



PureBytes Links

Trading Reference Links

Walter:

The code:

Open CurDir & "\GetWebData.iqy" For Output As FileNum
Print #FileNum, "WEB"
Print #FileNum, 1
Print #FileNum, "http://webservices.pcquote.com/cgi-bin/excel.exe";
Print #FileNum, "QUOTE0=" & allfundnames
Close

actually builds the query file "GetWebData.iqy" in whatever directory you
run the macro in.  The Open statement tells windows to create the file.  The
print statments actually put the lines in the file the close tells windows
to update the file and add it to the folder.

the macro then proceeds to "execute" the web query created in the above
statements in the following code:

    With ActiveSheet.QueryTables.Add(Connection:= _
        "FINDER;GetWebData.iqy", Destination:=Range("A50"))
        .FieldNames = False
        .RefreshStyle = xlInsertDeleteCells
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .RefreshOnFileOpen = False
        .HasAutoFormat = True
        .BackgroundQuery = True
        .TablesOnlyFromHTML = True
        .Refresh BackgroundQuery:=False
        .SavePassword = False
        .SaveData = True
    End With

Then it proceeds to delete the query file it created in the following code:

Kill CurDir & "\getwebdata.iqy"

So, you will not be able to acutally find the query file after you run the
macro: It creates, builds, executes and deletes it all within the macro. If
you'd like to be able to see it  (just use a text editor like notepad)
change the Kill ... statement to a comment by putting an ' in front of it:

'Kill CurDir & "\getwebdata.iqy"

now you should be able to "see" it..

Dale

> -----Original Message-----
> From: owner-metastock@xxxxxxxxxxxxx
> [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Walter Lake
> Sent: Friday, March 12, 1999 3:56 PM
> To: Metastock bulletin board
> Subject: TA in excel
>
>
> Thanks for the email Dale.
>
> As you probably know, we need all of the help we can get around here.
>
> The first serious piece of business I need help with is
>
> - 0 -
>
> If you downloaded Dave Steppan's stock/fund downloader from
>
> http://www.geocities.com/SiliconValley/Network/1030/ExcelTop.html
>
> go into the Macro and Visual Basic file to see how he uses them.
>
> go to "tools ---> macro --> visual basic editor"
>
> in the top left box -- click on "VBA project (MutFunds.xls)"
>
> then press print, you'll get 10 to 12 pages of all of the code
>
> One page one of the "Module 1" Sub GetFundQuotes()
> you'll see that he uses the "\GetWebData.igy" query file
>
> - 0 -
>
> I don't understand the "GetWebData.igy" usage, where as the Excel
> web query
> file in the program files\excel\queries is
> "GetMoreWebQueries.igy". Is that
> just a general usage? Where is his "igy" file?
>