You can be sure that the syntax is right - from the point of view of Excel.

Maybe LO doesn't support user defined types.

According to a couple of OpenOffice (Not LibreOffice, but still...) message boards I ran across, it does support user defined types, and with that same syntax.

Quote:

Originally Posted by mmat1

But the more probale reason is that it collides with the reserved names of LO. Replace "file" with "datei" (or "ficher" ) in the "Type" and in the "Dim" - declaration and see if it works.

I tried this also (changed it to my_file), but got the same error.

I also wondered if the actual error (from LO's point of view) occurred earlier in the module, and the line it indicated was merely where the interpreter realized there was an error, not the actual error itself. But messing with the two lines above the type declaration did not help either. Oh, well.