Translation to VB6

,

I’m translating a number of VB6 packages, created around Excel, so that they work with LO.

I can change

Dim var As New com.sun.star.beans.PropertyValue (from LO Basic)

to

Dim var

Set var = loSM.Bridge_GetStruct(“com.sun.star.beans.PropertyValue”), which works OK in VB6.

However, changing Dim CellRangeAddress As New com.sun.star.Table.CellRangeAddress to
Dim CellRangeAddress

Set CellRangeAddress = loSM.Bridge_GetStruct(“com.sun.star.Table.CellRangeAddress”), generates an automation error

and similarly with CellAddress.

Any help appreciated

W7 Professional, LO 6.3.5.2

If loSM it’s a valid instance for ServiceManager, then, change Table for table:

Set SM = CreateObject("com.sun.star.ServiceManager")
Set cell = SM.Bridge_GetStruct("com.sun.star.table.CellRangeAddress")    
MsgBox cell.Sheet

image description

Thank you mauricio. I must remember that this area is case sensative.,