Try to run a macro from excel but not success

I create a macro which run at excel but getting error when run in Libreoffice. Can someone help to edit the code so It can run at Libreoffce. The code itself is applied to a button, after press it will ask to key in a password, if correct it will run the next code. The next code will select and the same macro to sheet 01 to sheet 31.

Sub Button_Unlock()
    Dim Password As Variant
    Password = Application.InputBox(Prompt:="Please Enter Password (WARNING: Date Will Be Cleared)", Type:=2)
    Select Case Password
        Case False
            'Nothing
        Case "QC1234"
        Dim ws As Worksheet
        WkSheets = Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31")
        For Each ws In Sheets(Array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"))
            ws.Select
            ws.Activate
            Call Master_lock_open
        Next ws
        Case Else
        MsgBox "The Password You Entered Is Incorrect", vbExclamation
    End Select
End Sub

Welcome @Khoochoon !

Do you mean “so that the macro now does the same thing in LibreOffice” or “so that the macro works without errors in both Excel and LibreOffice Calc”?

This has been written about many times in various articles on spreadsheet programming - DO NOT SELECT sheets-ranges-cells, this is completely unnecessary and greatly slows down the execution of the program.

What should the Master_lock_open routine do with each of the workbook sheets?