Names and References

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

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.
 
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
 
thanks for the hint.

steve said:
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.
 
Back
Top