[Wylug-help] BASIC OOo
Scott Hodgson
linux at sh2515.plus.com
Tue Sep 25 22:15:49 BST 2007
Thanks very much for the solution. your comment on looking very
interesting, well it would be if the dam shares grew quicker. that leads
me on to another question, how do you make a macro to increase my bank
balance?
scotty @ dabbling in the worst shares . com
Mark Randall wrote:
> Hi,
>
> Well, I got it working by doing the following:
>
> Sub Main1
> Dim oDoc as Object
> oDoc=open_csv_file("http://download.finance.yahoo.com/d/quotes.csv?s=COST.L&f=sl1&e=.csv
> <http://download.finance.yahoo.com/d/quotes.csv?s=COST.L&f=sl1&e=.csv>")
> End Sub
>
> Function open_csv_file (url as string) as Object
> Dim oProperty(0) as New com.sun.star.beans.PropertyValue
> oProperty(0).Name= "FilterOptions"
> oProperty(0).Value= "44"
> open_csv_file = starDeskTop.loadComponentFromUrl(url, "_blank",
> O,oProperty())
> End Function
>
> Basically, I moved the main function to the top, because when I try to
> run the function by pressing F8 it tries to run the first function in
> the module.
>
> I took the final underscore from open_csv_file_(... away.
>
> Then I moved the oProperty line to the end of its previous line.
>
> Hope this helps - looks very interesting that URL!
>
> Cheers,
>
> Mark
>
> On 25/09/2007, *Scott Hodgson* <linux at sh2515.plus.com
> <mailto:linux at sh2515.plus.com>> wrote:
>
> hello
> I got the special edition OOo LXF magazine and in it has the Macro
> facility for collecting share prices, I typed it in and played with it
> as it had end sub for a function and other stuff that were cocking
> it up
> so have got the following but it doesn't work and I can't figure
> out why
> as I have not a good knowledge of programming could anyone help
> please.
>
> Sub Main
>
> End Sub
>
> Function open_csv_file (url as string) as Object
> Dim oProperty(0) as New com.sun.star.beans.PropertyValue
> oProperty(0).Name= "FilterOptions"
> oProperty(0).Value= "44"
> open_csv_file = starDeskTop.loadComponentFromUrl(url, "_blank", O,
> oProperty())
> End Function
>
> Sub Main1
> Dim oDoc as Object
> oDoc=open_csv_file_("http://download.finance.yahoo.com/d/quotes.csv?s=COST.L&f=sl1&e=.csv
> <http://download.finance.yahoo.com/d/quotes.csv?s=COST.L&f=sl1&e=.csv>")
> End Sub
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk <mailto:Wylug-help at wylug.org.uk>
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
>
More information about the Wylug-help
mailing list