View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Stone Frank Stone is offline
external usenet poster
 
Posts: 134
Default Adding named range gives error "method range of object _Global failed "

I copied your code and ran it on xl2k. I got no error
message and the code seem to run ok. At first I thought it
might be that you are trying to name 3 ranges at once with
the same name. But my excel took it. 1 name - 3 ranges
highlighted. I just learned something. the only thing i
chaged was visible = true. since I cannot duplicate your
problem, I'm not sure what to tell you. sorry.
-----Original Message-----
Hi,

Can anybody help me and tell why I get error 1004 "Method

Range of object _
Global failed" ?

I try to ensure it always will exist a named range when

the workbook is
opened, even if a user somehow deleted one of the hidden

named ranges in an
earlier session.

I have this code in ThisWorkbook in Public Sub

Workbook_Open() event:

ActiveWorkbook.Names.Add Name:="Sh104Rng",
RefersTo:=Range("C29:G48,C52:G71,C75:G94"), Visible:=False



/Kind regards




.