Hi Everyone,
I'm writing a procedure to create a workbook on demand. My problem is when I try to name a dynamic range programatically. This is the code I'm using:
ThisWorkbook.Names.Add Name:="ProdLines", _
RefersTo:="=OFFSET('ProdLines'!$A$1,1,1,COUNTA('ProdLines'!$A:$A)-1,1)"
This creates the named range ok, but the scope of the name seems to be limited to the sheet on which it was created, which means I can't reference it on any other sheets. Does anyon have an idea how I can get around this?
Thanks...
I'm writing a procedure to create a workbook on demand. My problem is when I try to name a dynamic range programatically. This is the code I'm using:
ThisWorkbook.Names.Add Name:="ProdLines", _
RefersTo:="=OFFSET('ProdLines'!$A$1,1,1,COUNTA('ProdLines'!$A:$A)-1,1)"
This creates the named range ok, but the scope of the name seems to be limited to the sheet on which it was created, which means I can't reference it on any other sheets. Does anyon have an idea how I can get around this?
Thanks...