View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gunnar Johansson Gunnar Johansson is offline
external usenet poster
 
Posts: 47
Default Adding named range gives error "method range of object _Global failed "

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