ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   C# .net and Excel Named Ranges (https://www.excelbanter.com/excel-programming/421042-re-c-net-excel-named-ranges.html)

Chip Pearson

C# .net and Excel Named Ranges
 


Try

Range TheRange
TheRange = Workbook.Names("Calcs").RefersToRange

This assumes that the name "Calcs" refers to a range. It is possible
to have a Name that refers to a constant or formula rather than a
range.

Cordially,
Chip Pearson
Microsoft MVP
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Tue, 9 Dec 2008 07:20:17 -0800, Jorge Ribeiro
wrote:

Hello

I've a named range "Calcs".
I want to get an Excel.Range object that reference that particular named
range.
I could do this iterating workbook.names collection but it seems to me that
there must be another way to accomplish this.

Can you help me here?

Best regards

Jorge



All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com