Board index » delphi » Syntax problem with Excel automation

Syntax problem with Excel automation

Hi!

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

When I select all shapes on ActiveSheet everything works fine:
        Excel.ActiveSheet.Shapes.SelectAll;

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;

Quote

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

--
Deborah Pate (TeamB)
http://delphi-jedi.org
Sorry, no email please.

Other Threads