Thread: Naming a Range
View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
jacqui[_2_] jacqui[_2_] is offline
external usenet poster
 
Posts: 30
Default Naming a Range


Tom/Bob

I've sussed the problem. One of my sheet names contained
a space, ie UK GAAP. When I removed this the range naming
worked as expected. Sorry for taking up your time, mind
you I was having a complete mental block yesterday.

Thanks again
Jacqui


-----Original Message-----
No, he said the error occurred on

Selection.CurrentRegion.Name = Range("A1").Value

The selection (and any error at that point) would already

have occurred.

I also noted in my response that the sheet must be active

for the code to
work as written.

So I don't think that is the current problem although

certainly a
consideration of merit and a potential problem.

--
Regards,
Tom Ogilvy



"Bob Phillips" wrote

in message
...

"Tom Ogilvy" wrote in message
...

If you were on another sheet or the code was in a

sheet module, then the
unqualified

Range("A1").Value

would not refer to the RI sheet and could be

problematic - however, I
would
not expect selection.currentregion.name to have a

similar problem.


I think that is the problem as Jacqui is trying to

select the current in
ws
(RI), which if not active will throw an error.




.