[Wylug-help] BASIC OOo
Mark Randall
randall.mark at gmail.com
Tue Sep 25 20:22:28 BST 2007
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")
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> 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")
> End Sub
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.wylug.org.uk/pipermail/wylug-help/attachments/20070925/1d79e833/attachment.html
More information about the Wylug-help
mailing list