Excel Selection OLE Error for multi areas

Add-in Express™ Support Service
That's what is more important than anything else

Excel Selection OLE Error for multi areas
Wrong separator char assignment separating ranges  
Michał Głębowski

Posts: 42
Joined: 2015-06-08
Dear Sirs.

When I select multiple areas (with Control key) in Excel and then if I get .Address I obtain i.e. B4:B7,D4:D7
When I write in VBA from immediate window:
it works.

When I write in Delphi
ExcelApp.Range['B4:B7,D4:D7', EmptyParam].Select;
i get OLE Error. I found, that if I replace separator "," with semicolon ";"
ExcelApp.Range['B4:B7;D4:D7', EmptyParam].Select;

it works ok.
My Windows settings assume ";" as separator and so excel functions' parameters are separated with ";"

Posted 03 Jul, 2015 06:21:35 Top
Andrei Smolin

Add-in Express team

Posts: 14356
Joined: 2006-05-11
Hello Michał,

ExcelApp.Range['B4:B7' + ExcelApp.DefaultInterface.International[Excel2000.xlListSeparator, 0] + 'D4:D7', EmptyParam].Select;

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 06 Jul, 2015 06:21:49 Top