2011/8/17 Johnny Rosenberg <gurus.knu...@gmail.com>:
> I edited a lot of code yesterday, one of the rows I did NOT edit was
> this one, which occurs at the top of a subroutine:
> ReDim NDice(1 To 6) As Integer
> It is defined in another module as:
> Public NDice(1 To 6) As Integer
> The error message I get is (translated from Swedish):
> ”BASIC syntax error:
> The NDice variable is already defined.”
> Yes, I know it is, that's one of the points by using ReDim, isn't it?
> Before doing some heavy editing there was no complaints on this line
> at all, and as I said, this is NOT one of the many lines I changed.
> So obviously some of my other edits caused this, but where to start
> looking? What can I possible have done to cause this?
> I just hate when these things happen, when there is an error message
> telling me that I can't do something that I should be able to do. Like
> if I got an error message for the line ”If a=b Then”, and the error
> message says: ”BASIC syntax error: a and b are already compared”…

I have now tried a couple of more things. I have changed the global
definition from Public to Private to Global to Dim and back again to
Public. Same result no matter what.
I have even removed the global definition, and I have searched through
ALL the modules after the variable to make sure it's not declared
elsewhere. STILL the error message says that it's already defined! I
would like to know where, because the Find thing (Ctrl+f) can't find
another definition of NDice than the ReDim on which the error occurs!
I have searched for Dim NDice, Public NDice, Private NDice and Global
NDice, nothing found except ReDim NDice (once – the one on which the
error occurs).

Well, I'll continue searching. I have now made a copy of the whole
document for wild debugging, so I will try the most brutal things I
can think of now, like removing entire modules to see if I can at
least find in what module I need to have a closer look at…

Any ideas are very welcome! I'm kind of losing my hair here… :P

Kind regards

Johnny Rosenberg
To unsubscribe send email to dev-unsubscr...@api.openoffice.org
For additional commands send email to sy...@api.openoffice.org
with Subject: help

Reply via email to