Access2Base in Calc - Open a form

Discussions about using 3rd party extension with OpenOffice.org

Access2Base in Calc - Open a form

Postby silvain » Thu Dec 31, 2015 6:58 pm

I have developped nice and sophisticated macros in Excel VBA to select lists, make lists of e-mails, and create labels for mailing - creating directly a RTF file, making it much easiar to use that any kind of mail merge procedure.
I would like to have them working in calc using the Access2Base extension. On of the persons using such a system cannot operate the macros herself because Microsoft manage to sell a version of Office for Mac without VBA...
Access2base looks promising, and much of my VBA code works pretty well with very little adjustment, but I am stuck on the problem of opening the dialogs (forms).
I tried using the OpenForm (DoCmd.OpenForm) method found on the Access2Base documentation. But this method systematically returns the error message «Erreur d'exécution BASIC. '91' Variable d'objet non définie.» (Basic exectuion error. '91' Object variable not defined).
The forms do open from the macro editor interface, but I do not find a way to open them with a macro assigned to a button.
Any solution for this problem?
LibreOffice 5.0.3.2 - Windows 7 and Linux Ubuntu 14.04
silvain
 
Posts: 3
Joined: Thu Dec 31, 2015 6:20 pm

Re: Access2Base in Calc - Open a form

Postby Villeroy » Thu Dec 31, 2015 8:29 pm

Access2Base is about databases. A spreadsheet is not a database.
Please stay with Excel/VBA
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, OpenOffice 4.x & LibreOffice 6.x
User avatar
Villeroy
Volunteer
 
Posts: 26417
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Access2Base in Calc - Open a form

Postby silvain » Fri Jan 01, 2016 1:19 pm

Thanks for your answer... But I am disappointed!
Even if Access2Base extension is designed for databases, much of the VBA code does work in my calc spreadsheet.
So I hope that this extension will be... extended in the future so as to work more fully for spreadsheets as well as databases.
LibreOffice 5.0.3.2 - Windows 7 and Linux Ubuntu 14.04
silvain
 
Posts: 3
Joined: Thu Dec 31, 2015 6:20 pm

Re: Access2Base in Calc - Open a form

Postby RoryOF » Fri Jan 01, 2016 1:29 pm

An answer might be to query whether the macro is running on Excel or OpenOffice, set a flag to indicate which, then use code appropriate to that operating system. ~If your VBA code is mostly running correctly under Calc, then only a small amount of such customisation will be needed.
Apache OpenOffice 4.1.6 on Xubuntu 18.04.2 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 28434
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Access2Base in Calc - Open a form

Postby JPL » Fri Jan 01, 2016 2:41 pm

But I am disappointed!
Even if Access2Base extension is designed for databases, much of the VBA code does work in my calc spreadsheet.
So I hope that this extension will be... extended in the future so as to work more fully for spreadsheets as well as databases.

Thanks for your appreciation of the work done on Access2Base.
However I'm afraid you will remain disappointed. There are no plans to make something like an Excel2Calc extension. :(
There is indeed still a lot to do on the Base part.

I tried using the OpenForm (DoCmd.OpenForm) method found on the Access2Base documentation.

On the Getting Started page of the Access2Base documentation you will find a list of methods that are available even without database connection. Among them the AllDialogs collection. Try using dialogs instead of forms. There is a big chance that it works within Calc. Note however that it has not been thoroughly tested.

Hoping this will help.
JPL
Windows 7 / LibO 6.0 / AOO 4.1
Ubuntu 18.04 / LibO 6.1
Access2Base extension (AOO) or standard (LibO).
BaseDocumenter extension (LibO)
Documentation on http://www.access2base.com and http://www.access2base.com/basedocumenter
JPL
Volunteer
 
Posts: 98
Joined: Fri Mar 30, 2012 3:14 pm


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest