Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Le 09/03/2013 23:12, Andrew a écrit :

Hi Andrew,

On 3/9/2013 12:42 PM, Johnny Rosenberg wrote:

VBA.  Ouch.   I've received "Basic runtime error 1". Is there a
translation
guide?

There used to be one available for paying customers of StarOffice, at
the time supplied by Sun, not sure whether it is still available anywhere.


This is not just a simple one line macro, this is a program of
relatively
large proportion - I estimate hundreds of lines of code. And I have
others I
will probably need to do the same.

You will need to take a deep breath, select a few choice expletives, and
just knuckle down to it or give up, unfortunately. There is no miracle
cure for converting a VBA based Excel app to LO Basic.



By the way, it sure would be nice if I could copy & paste error
messages
directly from the error dialogs (the same way I was able to copy &
paste the
version string), instead of having to retype them.

I thought this was already possible from version 3.6.x onwards ? Perhaps
it was only introduced in 3.6.4 or later, but I can copy the messages by
selecting with the mouse and then right mouse button clicking on my 4.1
test build from the master source repository.


I have this sinking feeling that converting to star basic is a step
backwards in time, not forward.  Is there any other *current* program
this BASIC is compatible with?  Or does this lock me into LibreOffice? 
Maybe I'd be better off converting to java if I'm going to do a major
rewrite?

LO Basic is a particular variant of a Basic type language, dependent on
the UNO API. Objects and methods are not always the same in LO Basic and
VBA, for example.

The UNO API is also fairly old, and has only recently started undergoing
more changes - LO Basic is just one way of accessing the UNO API. If you
have no choice but to rewrite (which seems to be the case), you might be
better off with Python, which appears to be the language of choice for
much of the ongoing/upcoming scripting functionality. That's not to say
that there aren't other language bindings, because there are :

- Javascript
- Beanshell
- REXX (this works/worked on OpenOffice.org, not sure about LO or
ApacheOO though)


Here is the first thing it errored out on.  The "set rng=" statement.  I
include the entire subroutine so that you have some context.  Since this
is the entry point to my program I suppose you could just copy & paste
it to your own empty file called "newinputs.xls" and see what happens
when you run it.  Thank you

You might want to start looking here :

http://api.libreoffice.org/docs/common/ref/index-files/index-18.html

Unfortunately, the documentation is lacking somewhat. You might have
better luck trying to find the OpenOffice.org Developer's Guide,
however, the link provided on the LibreOffice wiki to this document
returns a "404 not found", so it has obviously been moved somewhere else.

Alex






-- 
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.