ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Urgent! Named range scope (https://www.excelbanter.com/excel-programming/421496-urgent-named-range-scope.html)

Jorge Ribeiro

Urgent! Named range scope
 
Hello

I've an excel app written in c#
How can I check the scope of a name range?!

ie: i've a range name ABC with scope Sheet1 and another ABC with scope
Workbook

How can i check the scope of a range?

it's urgent... it's slowing me down

best regards

Jorge

Rick Rothstein

Urgent! Named range scope
 
I don't use C#, so I can't help you with your syntax, but in VBA (the
language this newsgroup usually caters to) you would reference the range
like this...

Worksheets("Sheet1").Range("ABC")

where the sheet name and range name are specified as String arguments to the
Worksheet and Range properties... perhaps this will help you in translating
it into C#.

--
Rick (MVP - Excel)


"Jorge Ribeiro" wrote in message
...
Hello

I've an excel app written in c#
How can I check the scope of a name range?!

ie: i've a range name ABC with scope Sheet1 and another ABC with scope
Workbook

How can i check the scope of a range?

it's urgent... it's slowing me down

best regards

Jorge



Jim Rech

Urgent! Named range scope
 
A local name in Excel has an exclamation point as part of it, e.g.,
Sheet1!RgName.

In VBA, this: Range("RgName").Name.Name

returns: Sheet1!RgName

So I'd look for the "!" in the Name.Name property.

--
Jim
"Jorge Ribeiro" wrote in message
...
| Hello
|
| I've an excel app written in c#
| How can I check the scope of a name range?!
|
| ie: i've a range name ABC with scope Sheet1 and another ABC with scope
| Workbook
|
| How can i check the scope of a range?
|
| it's urgent... it's slowing me down
|
| best regards
|
| Jorge



All times are GMT +1. The time now is 12:45 PM.

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