Thread: Range Names
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chris Gorham[_3_] Chris Gorham[_3_] is offline
external usenet poster
 
Posts: 31
Default Range Names

Hi,

I asked for some code to allow me to cycle through the
Range Names in a Workbook in alphabetical order.

With ActiveWorkbook.Names
For N = 1 To .count
rng_name = .Item(N).Name
Next N
End with

This works, but there is a problem...
There is a trick (I've forgotten how) where the define /
range name menu allows you to have the sheet name, which
contains the range being created, appearing to the right
of it in the dialog box.

This sheet name appears as part of the range name when you
use the macro code above, thus ensuring that the order is
nonalphabetical.

Any help appreciated

Chris