Board index » delphi » Syntax problem with Excel automation

Syntax problem with Excel automation


I created Excel object:
        Excel := CreateOleObject('Excel.Application');

When I select all shapes on ActiveSheet everything works fine:

When I try to select only one shape (named as 'Teksti 25'):
        Excel.ActiveSheet.Shapes['Teksti 25'].Select;
it doesn't work. What is wrong ? My Excel is Finnish lanquage version.

Best Regards
Ilkka lahdenpohja


Re:Syntax problem with Excel automation

<<Ilkka Lahdenpohja:
Excel.ActiveSheet.Shapes['Teksti 25'].Select;


Try this:
Excel.ActiveSheet.Shapes.Item('Teksti 25').Select;

Deborah Pate (TeamB)
Sorry, no email please.

Other Threads