I have an Excel WorkBook with VBA macros, There is no problem with it on Excel.
As I try to open it on LO Calc, I got a lot of compatibility problems, I fixed them all but 1.
I fixed problems like conditional compilation (#If ... #End If) incompatibility.
I use Libre Office 6.1 Calc.
I use Libre Office 6.3 Calc.
I got 1 remaining error on this code:
Function Extract(Chaine, Optional Pos = 1, Optional Balise)
If IsNumeric(Chaine) Then
Extract = Chaine
Set re = CreateObject("VBScript.RegExp")
re.Global = True
If IsMissing(Balise) Then
re.pattern = "[0-9,.]+"
Set A = re.Execute(Chaine)
If A.Count >= Pos Then Extract = val(Replace(A(Pos - 1), ",", "."))
re.pattern = Balise
B = Strings.Split(re.Replace(Chaine, vbNullChar), vbNullChar)
If B.Count >= Pos Then Extract = val(Replace(B(Pos - 1), ",", "."))
Erreur d'exécution BASIC.
Message: [automation bridge]UnoConversionUtilities<T>::anyToVariant
Cannot convert the value of type :"com.sun.star.uno.XInterface" to the expected Automation type of VARTYPE: 8
is supposed to return collection of object.
A2= Extract(A1) => 100
A3= Extract(A1,2) => 10
A4= Extract(A1,3) => 150
What I have tried:
This code works perfectly in Excel, but fail to compil in Calc.
What did I missed?