Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Ranges of Named Fields

Hi to all !

In Excel 97, I try to get the range of the existing fields : by example

FieldName range
namedProf Param2!$A$1:$A$50

I use the following code :
Dim intPtr1 As Integer
'
Sheets("Content").Select
Range("G2").Activate
ActiveCell = "NamedFields"
For intPtr1 = 1 To Application.ActiveWorkbook.Names.Count
ActiveCell.Offset(intPtr1, 1) =
Application.ActiveWorkbook.Names(intPtr1).Name
ActiveCell.Offset(intPtr1, 2) = Names(intPtr1).RefersTo
Next intPtr1

but the results are not OK

Can anyone help ??

Thanks by advance and regards from Belgium.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Ranges of Named Fields

if you trying to write a list of names and there refers to

Dim intPtr1 As Integer
'
Sheets("Content").Select
Range("G2").Activate
ActiveCell = "NamedFields"
For intPtr1 = 1 To Application.ActiveWorkbook.Names.Count
ActiveCell.Offset(intPtr1, 1) =
Application.ActiveWorkbook.Names(intPtr1).Name
ActiveCell.Offset(intPtr1, 2) = "'" & Names(intPtr1).RefersTo
Next intPtr1
Next

or you could try

Sheets("Content").Select
Range("G2").Activate
Selection.ListNames

--
Regards,
Tom Ogilvy


"affordsol" wrote in message
...
Hi to all !

In Excel 97, I try to get the range of the existing fields : by example

FieldName range
namedProf Param2!$A$1:$A$50

I use the following code :
Dim intPtr1 As Integer
'
Sheets("Content").Select
Range("G2").Activate
ActiveCell = "NamedFields"
For intPtr1 = 1 To Application.ActiveWorkbook.Names.Count
ActiveCell.Offset(intPtr1, 1) =
Application.ActiveWorkbook.Names(intPtr1).Name
ActiveCell.Offset(intPtr1, 2) = Names(intPtr1).RefersTo
Next intPtr1

but the results are not OK

Can anyone help ??

Thanks by advance and regards from Belgium.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Show named fields in cell insomniux Excel Discussion (Misc queries) 7 October 11th 06 12:41 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Sorting blocks of data or named fields? Greg New Users to Excel 1 January 26th 05 12:35 PM
Named Ranges Gary T Excel Worksheet Functions 2 December 27th 04 02:28 AM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"