Some of my code has broken as I upgraded from LO3.5 to 4.0
It involves the popular function MakeProperty Value. This short macro demonstrates the problem on an empty spreadsheet:
I set a CellAddress. To prove the point, I open a MsgBox which displays the column, row and sheet.
I then pass this to MakePropertyValue:
MakePropertyValue( "SourcePosition", aAddress )
In LO 3.5 it sets the property value without error.
In LO 4.0 the second argument (uValue) appears to be empty, however it isn’t “missing” so the test:
If Not IsMissing( uValue ) Then
Succeeds yet the following assignment fails:
oPropertyValue.Value = uValue
With the error “Object Variable not set”
Is this a problem with my code?
Or is there a subtle bug in the common function MakePropertyValue?
I tried declaring uValue to be an object but then it fails when I pass it a string…