View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Version Incompatibility

I am surprised it worked in 2003. Try

Set colb = Range("B:B")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"JUnk" wrote in message
...
I have a simple workbook with some code which includes the lines:

colb = Range("B:B")
nrows = Application.CountA(colb)

This has always been run under Excel 2003 where it works fine. However

today
we ran the same code on Excel 2000 and the second line produces a type
mismatch error. Can anyone shed some light on this and provide an
alternative which will work under all versions?

Thanks

Ted