ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Version Incompatibility (https://www.excelbanter.com/excel-programming/336369-version-incompatibility.html)

JUnk

Version Incompatibility
 
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



Bob Phillips[_6_]

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






All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com