View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
steve steve is offline
external usenet poster
 
Posts: 576
Default Names and References

Friedrich,

use something like this (modify to match your names)

Dim x as Long

x = Sheets("MySheet").Range("MyRange").Column

Workbook level and sheet level names belong to the workbook and the
sheet.

--
sb
"Friedrich Muecke" wrote in message
...
Hi,

i use automated csv-import for analysis things.
i named all columns in my import sheet (... to be independant of import
changes like additional columns i used 'Sheet1Name & Column1Header' as

name
for column1 in sheet1)

later on i know the name and sheet of some column, but i want to get the
column index.
how to do this with vba?

i tried around with range("..").column, but this doesn't work.
i read about names("...").RefersToRange, but at the end i think i should

ask
the experts ;-)

btw, are these names privat properties or public or ...?

regards, Fritz