![]() |
Problem with using addreslocal
Dear all
I have the following code to set the name and x and y properties of a chart series. These need to refer to a certain worksheet (T1, T2, etc identified by the parameter Tsel) and to a certain range on these sheet. ..SeriesCollection(nl).Name = "='T" & TSel & "'!" & Cells(38, j).AddressLocal(ReferenceStyle:=xlR1C1) ..SeriesCollection(nl).XValues = "='T" & TSel & "'!" & Range(Cells(40, 1), Cells(40 + nr - 1, 1)).AddressLocal(ReferenceStyle:=xlR1C1) I have used the AddressLocal property to create references in the local language. When I run the code above on an English version, the code runs fine. On a German Excel version the code fails on the second line (object failure). If I evaluate the string which is created at the righ side of the equation it seems to me OK (like ='T2'!Z40S1:Z100S1). The curious thing is that the first line works OK, so it seems there is no problem with the reference to the worksheet itself. The problem must be somewhere in the definition of the range which spans multiple rows. Any suggestion is appreciated Martien |
All times are GMT +1. The time now is 06:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com