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+h...@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