I have to migrate document from MS Excel to Open Office with macros. Everything works fine except this function
If Application.WorksheetFunction.IsNumber(Cells(12, 5)) = False Then
MsgBox "Nesprávne zadané číslo účtu alebo kód banky!", vbCritical
ActiveSheet.Protect Password:="****", DrawingObjects:=True, Contents:=True, Scenarios:=True
Exit Sub
End If
It's check for values inserted by user. But I get only this error:
BASIC runtime error Variable of object is not set
So I double checked my document, if cell E12 is not empty, but it was filled. Is there in Open Office a different way to check input format? Thanks
The number in Excel Visual basic is different like in oo. try use getCellByName("E12").Value this function returns you Number