Description: An unexpected runtime error when the argument of a sub procedure is a Variant that can be an object or not. Steps to Reproduce: Sub Main Test("One") End Sub Sub Test(pvArg As Variant) On Local Error GoTo Erreur If IsObject(pvArg) then Print pvArg.SupportsService("com.sun.star.table.Cell") Else Print "pvArg is not an object" EndIf Exit Sub Erreur: Print "Error" End Sub Actual Results: Raises a runtime error on the first line of the sub procedure. The 'On Local Error instruction' is ignored Expected Results: No runtime error. The argument should be tested by IsObject. Reproducible: Always User Profile Reset: No Additional Info: [Information automatically included from LibreOffice] Locale: en-US Module: BasicIDE [Information guessed from browser] OS: Mac OS X (All) OS is 64bit: no
You couldn't print pvArg.SupportsService("com.sun.star.table.Cell") You could print "Object" instead.