Kod: Zaznacz cały
Dim SprzedazOknoDial As Object
Sub PokazSprzedazOknoDial
DialogLibraries.LoadLibrary("Standard")
SprzedazOknoDial = CreateUnoDialog( DialogLibraries.Standard.SprzedazOknoDial )
SprzedazOknoDial.Execute()
End Sub
Sub Dodaj_Click1
Dim IleKosztuje As Object
Dim StaraWartosc As Single
Dim NowaWartosc As Single
oDocument = ThisComponent
oSheet = oDocument.getSheets.getByName("Sprzedaz")
oCell = oSheet.getCellRangeByName("A1")
StaraWartosc = oCell.getValue
MsgBox (StaraWartosc,,"Stara Wartość z komórki") Rem Podgląd wartości
IleKosztuje = SprzedazOknoDial.getControl("Cena")
MsgBox (IleKosztuje.text,,"Ile Kosztuje") Rem Podgląd wartości
ThisComponent.Sheets(15).getCellRangeByName("A1").setValue(IleKosztuje.Text)
NowaWartosc = oCell.getValue
oCell.setValue (StaraWartosc+NowaWartosc)
End Sub
Sub ZamknijOkno
SprzedazOknoDial.endExecute()
End Sub