von Miki W » Fr, 06.03.2015 19:31
Hallo Ihr Lieben,
ich klicke die Artikelzeile an und über eine Schaltfläche aktiviere ich das basic script
ich möchte über ein Eingabefeld den Wert mit einer Kommazahl eingeben und danach auch damit rechnen.
in der Übergabezelle steht jetzt die Ganzzahl ohne die Nachkommastellen.
Hat Jemand da einen Rat?
LG Micha
Code: Alles auswählen
sub ARTIKEL
dim document as object
oDoc=thisComponent
Sheet = odoc.sheets(2)
oCellCursor = Sheet.createCursor
oCellCursor.GotoEndOfUsedArea(False)
oCelle=oDoc.getCurrentSelection().getCellAddress()
' aktuelle Zeile, Index
oRow=oCelle.Row
Cell = Sheet.getCellByPosition(0, oRow)
Wert = Cell.string
Cell = Sheet.getCellByPosition(1, oRow)
Wert1 = Cell.string
Cell = Sheet.getCellByPosition(3, oRow)
Wert2 = Cell.Value
anzahl=inputbox ("wieviel Stück?") ' hier ist mein Problem
Cell = Sheet.getCellByPosition(2, oRow)
Cell.value = anzahl
Cell = Sheet.getCellByPosition(4, oRow)
Cell.string = "ausgewählt"
Sheet = odoc.sheets(1) '[erstes Arbeitsblatt]
Cell = Sheet.getCellByPosition(3, 7)
i=cell.value
cell.value = i+1
i= i+14
Cell = Sheet.getCellByPosition(0, i)
Cell.String = Wert
Cell = Sheet.getCellByPosition(1, i)
Cell.String = Wert1
Cell = Sheet.getCellByPosition(2, i)
Cell.Value = anzahl
Cell = Sheet.getCellByPosition(3, i)
Cell.Value = Wert2
end Sub
Hallo Ihr Lieben,
ich klicke die Artikelzeile an und über eine Schaltfläche aktiviere ich das basic script
ich möchte über ein Eingabefeld den Wert mit einer Kommazahl eingeben und danach auch damit rechnen.
in der Übergabezelle steht jetzt die Ganzzahl ohne die Nachkommastellen.
Hat Jemand da einen Rat?
LG Micha
[code]
sub ARTIKEL
dim document as object
oDoc=thisComponent
Sheet = odoc.sheets(2)
oCellCursor = Sheet.createCursor
oCellCursor.GotoEndOfUsedArea(False)
oCelle=oDoc.getCurrentSelection().getCellAddress()
' aktuelle Zeile, Index
oRow=oCelle.Row
Cell = Sheet.getCellByPosition(0, oRow)
Wert = Cell.string
Cell = Sheet.getCellByPosition(1, oRow)
Wert1 = Cell.string
Cell = Sheet.getCellByPosition(3, oRow)
Wert2 = Cell.Value
anzahl=inputbox ("wieviel Stück?") ' hier ist mein Problem
Cell = Sheet.getCellByPosition(2, oRow)
Cell.value = anzahl
Cell = Sheet.getCellByPosition(4, oRow)
Cell.string = "ausgewählt"
Sheet = odoc.sheets(1) '[erstes Arbeitsblatt]
Cell = Sheet.getCellByPosition(3, 7)
i=cell.value
cell.value = i+1
i= i+14
Cell = Sheet.getCellByPosition(0, i)
Cell.String = Wert
Cell = Sheet.getCellByPosition(1, i)
Cell.String = Wert1
Cell = Sheet.getCellByPosition(2, i)
Cell.Value = anzahl
Cell = Sheet.getCellByPosition(3, i)
Cell.Value = Wert2
end Sub
[/code]