VBA Code in LibreOffice Calc
11.06.2018 19:44:34
Philipp
ich möchte folgenden Code in Libre Office Calc zum laufen bringen.
Leider stimmen anscheinend manche Befehle nicht überein, da Libre ein anderes "VBA" verwendet.
Kann das hier jemand lösen?
Danke an dieser Stelle an "sepp" für deine Hilfe und den funktionalen Code!
Sub Druck()
Dim Spalte As Long
Dim Zeile As Long
Dim Zeilendifferenz As Long
Dim lngRow As Long
Dim rngCopy As Range
Spalte = 4 'Spalte für Bedingung
Zeile = 5 'Beginn zeile Bedingung
Zeilendifferenz = 5 'Zeile in Tabelle Druck (Einfügen Übertrag)
With Worksheets("Eingabe")
For lngRow = Zeile To 150
If .Cells(lngRow, Spalte) 0 Then
If rngCopy Is Nothing Then
Set rngCopy = .Rows(lngRow)
Else
Set rngCopy = Union(rngCopy, .Rows(lngRow))
End If
End If
Next
End With
If Not rngCopy Is Nothing Then
rngCopy.Copy
With Sheets("Kalkulation").Cells(Zeilendifferenz, 1)
.PasteSpecial Paste:=xlValues
.PasteSpecial Paste:=xlFormats
End With
Application.CutCopyMode = False
End If
Set rngCopy = Nothing
End Sub