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


On Wed, 2011-11-09 at 15:36 -0800, budi machribie wrote:
Dear Sir,

Hi Budi

For future reference - It is much better if you start a new thread for
new questions, rather then changing the subject line from an existing
discussion.



I would be much obliged if you could help me with the following problem  

Using LibreBase (Ubuntu 11.10) I tried to make a pushbutton macro to open a form "Name2c" from 
within another form

From the Internet I get the following script


Sub OpenAForm(oEv As Object)
Dim GetFormName As String
Dim GetForm as Object
GetFormName = "Name2c"
GetForm = ThisDatabaseDocument.FormDocuments.GetByName(GetFormName)
GetForm.Open
End Sub

however when I run it the following message appears 

Basic runtime error 
Object variable not set

Yeah - the problem is that the psudo variable ThisDatabaseDocument is
only valid when the macro is contained in a basic library embedded in
the ODB file - and refers explicitly to this Base file without regard
from where it's called.

So, I'm guessing your calling it from a shared Basic library, just move
the code into the ODB file and your good to start.

Best wishes,

//drew


-- 
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.