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