View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] NoSpam@aol.com is offline
external usenet poster
 
Posts: 142
Default Problem using a named range

Using Excel 2003, I have a workbook with a single sheet. A single cell on
that sheet is a named range with name "bbb".

If I try to run:

Sub jnk()
Dim i As Long

i = Range(Names("bbb"))
End Sub

I get an "application defined or oblect drfined error", yet if I type
i = Range(Names("bbb"))
?i
in the immediate window, I get no error and the correct value of i is
displayed.

What is wrong with my Sub?

Thanksfor your help.