View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Problem getting cell value from range var

Sub efg()
Dim q As String
q = Range("jde_NewData")(1).Text
MsgBox "x=" & q

End Sub

--
Regards,
Tom Ogilvy

"John" wrote in message
...
I am running the following test macro code to display content of the first
cell in a verticle single column named range that contains about 20 items

and
am getting a q=Error 2042 runtime 13 type mismatch error. How do I get the
first cell content correctly?

q = Range("jde_NewData")(1).Value
MsgBox "x=" & q