View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Counting Columns in Dynamic Range

Hi your code works if the name is defined for the active workbook. So
you may check (again) your name definition

--
Regards
Frank Kabel
Frankfurt, Germany
"ExcelMonkey " schrieb im
Newsbeitrag ...
I have a Dynamic Named Range "DynamicSeedRow". I know that it spans
from D1 to E1 (i.e. two columns)

I am tyring to pass the number of columns to a variable

Dim DataFieldRank As Integer
DataFieldRank = Range("DynamicSeedRow").Columns.Count

I keep getting Error 1004 Method range of Object _Global Failed.

What am I doing wrong?


Thanks


---
Message posted from http://www.ExcelForum.com/