Johnny Rosenberg wrote:
2008/2/6, Jonathan Kaye <[EMAIL PROTECTED]>:
Johnny Rosenberg wrote:

<snip>
I tried your macro and I didn't get the problems you described. It
seemed
to work perfectly. Maybe I need your whole document to evaluate what's
going on.
Sorry for the delay. I needed a place to upload the file. Note it's 1.7MB.
You can get it here:
http://homepage.univie.ac.at/jonathan.kaye/docs/ndp11testsort.ods

By the way, I think it is a better idea to ask this kind of questions at
the [EMAIL PROTECTED] mailing list. There are usually more macro
programmers on that list that can help you better.

Thanks for the advice. I'll do that.
Cheers,
Jonathan
Johnny Rosenberg
I have done some tests:

I got the Error 509 just like you. In T1 I typed =map(B1), which failed.

However, I created a new spreadsheet and copied the function to it. In A1 I
entered some nonsense and in B1 I entered =map(A1) and I got a result!

Next, I renamed your function to MyFunction. That worked too, so it seems
like SOMETHING in your document is somehow named "map" or something in that
document makes it impossible to use the "map" as a name of a function. Calc
seems to think that you mean something else than the function and it puts
the character ' around the word "map", so that T1 looks like ='map'(B1).

Hope someone can explain what's going on here, because I didn't find the
reason for this behaviour, however I found a solution (change the name of
the function). I hope that helps.


☺

Johnny Rosenberg

Jonathan

With a little experimentation on what Johnny found, I discovered that the name of your function corresponds to an entry in cell Q16640. This seems to be where the conflict comes from.

When the error message appeared, I selected no, which gave the 509 error in the cell. If you then select the same cell in the T column, then drag it to the cell below (to copy it), you get the entry in cell Q16641, ='bush fire,veld fire'(B5), replacing ='map'(B5) in the function. Drag down to the next cell changes the function to the next cell in column Q. If you change the entry in cell Q16640 by adding another character(period., trailing space), the function will behave when entering it in a cell in column T.

An item of note, is that when you enter in the cell your function, the capitalization is changed to match what is in cell Q16640, after selecting No in the error dialog. Change the capitalization of cell Q16640 and the entry in your function will match.

Another oddity is that if you change the data in Q16440 slightly, so that your function works in a cell in column T. Enter in your function in a cell in column T. Works of course. Then change Q16640 back to its original form. I could then copy/paste the cell with the working function into another cell and it would still work. But if you try to type the function in, it will fail as usual.

A Bug?

TomW

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to