Hi,
I used this code to try and define a dynamic range. Got it by recording macro. While it is defined in the Insert->Define->Name menu, references to Range("DATABASE") will cause error "Reference is invalid" -- Help??
xlBook.Names.Add Name:="DATABASE", RefersToR1C1:= _
"=OFFSET(Sheet1!R1C1,0,0,COUNTA(Sheet1!C1),6)"
I used this code to try and define a dynamic range. Got it by recording macro. While it is defined in the Insert->Define->Name menu, references to Range("DATABASE") will cause error "Reference is invalid" -- Help??
xlBook.Names.Add Name:="DATABASE", RefersToR1C1:= _
"=OFFSET(Sheet1!R1C1,0,0,COUNTA(Sheet1!C1),6)"