View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz[_2_] JLGWhiz[_2_] is offline
external usenet poster
 
Posts: 1,565
Default Creating Named range problem

Guessing the "My List" is a sheet name, then

Change fromg

sht = "My List"

To

Set sht = Sheets("My List")




"Billy B" wrote in message
...
I am trying to create a dynamic named range in my Workbook Open event and
the
debugger tells me there is a problem. I can't figure it out. Any help
would
be appreciated.

Dim sht As Worksheet
sht = "My List"
ActiveWorkBook.Names.Add Name:="KidsNames"
RefersTo:=sht.Offset($A$1,0,0,CountA($A$A),5)

Thank you.