Posted: Fri Dec 03, 2004 4:02 pm Post subject: macro bug? (Bugzilla down)
Hi, I ran across what may be a bug in NeoJ 1.1 Alpha 2 Patch 5 and I thought you might like to know about it. Here it is:
I use a macro for parsing text into columns, it was posted on the OOo web-site some ago as a TextToColumns-like behavior fix. The only problem is that it parses numbers as text (e.g., not "5" but "'5", with a preceding apostrophe) so I wrote a macro to convert text to numbers (see below for the macro). When I try to run this macro, it gives an error message, "BASIC runtime error. Variable not defined." on the fourth line down, "oSelectColumn=ThisComponent.CurrentSelection.Columns". This macro runs okay on NeoJ 0.8.4 and with OOo 1.1 for X11. It seems like its specific to this particular line because there are a few lines before it that run okay and the TextToColumns macro runs as well.
So is this a bug, or is it something that is beyond your control? Thanks!
Cheers,
Andrew
Sub TextToNumber
Dim oSheet As Object, oCell As Object, cellstring As String
oSheet=StarDesktop.CurrentComponent.CurrentController.ActiveSheet
oSelectColumn=ThisComponent.CurrentSelection.Columns
oSelectRow=ThisComponent.CurrentSelection.Rows
Posted: Fri Dec 03, 2004 6:48 pm Post subject: Re: macro bug?
Patrick,
Okay nevermind, NeoJ wasn't the problem. When I copied the macros to the 1.1 Library, I had tried putting my macro in with the TextToColumns macro's Library and there was something in there that broke it (maybe Option Explicit at the beginning-- I'm not sure). Regardless, if I put it in the Standard Library, it works fine. So, sorry for the trouble, one of these days I'll learn to think faster than I type!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum