how to from Dialog to Calc? [closed]

asked 2013-07-25 17:02:32 +0200

Tarcisio gravatar image

updated 2013-07-25 20:22:54 +0200

hi i tryed a lot of different to ways

 oCell=oSheet.getCellByPosition(2,1)

DONT WORK -> oCell = oDialog.getControl("TextField1") (return that there is no specific variable)

to do that:

sub AtosPjGrupo3Show
    DialogLibraries.LoadLibrary("Standard")
    oAtosPjGrupo3 = CreateUnoDialog( DialogLibraries.Standard.AtosPjGrupo3 )
    oAtosPjGrupo3.Execute()
End Sub


Sub EditaTeste
Dim oDocument As Object, oSheet As Object, oCell As Object
   oDocument=ThisComponent
   oSheet=oDocument.Sheets.getByName("Planilha1")
   oCell=oSheet.getCellByPosition(2,1)
   oCell.Value = AtosPjGrupo3.txtProtocolo.Value

   MsgBox "Salved"

End Sub

but it return basic error, undefined variable ¬¬!! why? i think im using the incorrect syntax to access the dialog itens

and yes the textbox name = txtProtocolo

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-10-04 19:59:11.552466

Comments

NO ONE? :(!

Tarcisio gravatar imageTarcisio ( 2013-07-25 20:19:19 +0200 )edit

The cuestion is closed, but if someone is interested... You must terminate the dialog with the function endDialog().

Sub TerminateButton(oEvent).
    oEvent.Source.Context.endDialog(Value)
End Sub

Sub AtosPjGrupo3Show
    ...
    AtosPjGrupo3Show=oAtosPjGrupo3.Execute()
End Sub

Sub EditaTeste
    ...
    oCell.Value = AtosPjGrupo3Show
    ...
End Sub

Source: https://wiki.openoffice.org/wiki/Docu...

ferne gravatar imageferne ( 2018-05-30 08:45:14 +0200 )edit