To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=42240
------- Additional comments from [EMAIL PROTECTED] Fri Feb 11 09:32:08 -0800
2005 -------
Ok, that code works, but it creates a new problem. I can't access the controls
on the dialog.
I discovered that my code works if it isn't called from an event. However, if I
call it from an event, I get a null dialog container.
REM getCriteria
REM
REM get criteria for report from user
REM prefill with values from current report if present
REM
Sub getCriteria()
' declare objects to reference our date controls from our dialog box
Dim asOfDateControl as object
dim oLib as object
dim dlgDef as object
oLib = DialogLibraries.getByName("Standard")
dlgDef = oLib.getByName("CriteriaDialog")
if IsNull(dlgDef) then
msgbox "Dialog not defined."
end if
oDlg = CreateUnoDialog(dlgDef)
asOfDateControl = oDlg.getControl("asOfDate")
asOfDateControl.setDate(CDateToISO(now())) ' set From Date control
oDlg.execute() ' show dialog box
End Sub
So I get "Dialog not defined." when calling from a button. The macro and the
dialog are both in the documents standard library, so they should be loaded.
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]