Seite 1 von 1

VBA to libreoffice question

Verfasst: Mo 16. Mär 2020, 12:28
von comandos
Greetings,

I need a little help editing my existing VBA code to work with libre office.
I would like:
1) to copy errors in column C if the date in the same row in yellow,
2) sort them all by date oldest to newest
3) (if possible) if the button (that triggers the macro is pressed it clears any previous entries in “STATUS” tab).
https://imgur.com/a/GQVmEPv ← example

code

Code: Alles auswählen

Option Compare Text
Sub getAllErr()
    Dim ws As Worksheet
    Dim lastRow As Integer
    For Each ws In ThisWorkbook.Sheets
        If ws.Name <> "status" Then
            For i = ws.UsedRange.Rows.Count To 2 Step -1
                If ws.Cells(i, 1).Interior.Color = 65535 Then
                    lastRow = ThisWorkbook.Sheets("status").Cells(Rows.Count, 1).End(xlUp).Row
                    ThisWorkbook.Sheets("status").Cells(lastRow + 1, 1) = Format(ws.Cells(i, 1), "Short Date")
                    ThisWorkbook.Sheets("status").Cells(lastRow + 1, 2) = ws.Name
                    ThisWorkbook.Sheets("status").Cells(lastRow + 1, 3) = ws.Cells(i, 3)
                End If
            Next i
        End If
    Next ws
End Sub
MsgBox "Kopirano"
BR

Re: VBA to libreoffice question

Verfasst: Mo 16. Mär 2020, 18:26
von F3K Total

Re: VBA to libreoffice question

Verfasst: Di 17. Mär 2020, 07:54
von comandos
F3K Total hat geschrieben:
Mo 16. Mär 2020, 18:26
crossposting
My bad, still looking for help.

Re: VBA to libreoffice question

Verfasst: Di 17. Mär 2020, 18:22
von F3K Total
we all lern...
solution in english forum available ...
R