ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with code causing Excel '97 to crash (https://www.excelbanter.com/excel-programming/301653-problem-code-causing-excel-97-crash.html)

Pozzo[_6_]

Problem with code causing Excel '97 to crash
 
I hope somebody will be able to help with this. The code below cause
Excel to crash using version '97 but runs fine with Excel 2000.

For j = IIf(updateFrom 52, updateFrom, 53) To updateTo
Cells(r, j - 44).Value
IIf(IsNull(rstProductData.Fields(j).Value), 0
rstProductData.Fields(j).Value)
Next j

It executes this code (which precedes it) without any problems:

For j = updateFrom To IIf(updateTo 52, 52, updateTo)
Cells(r, j + 8).Value
IIf(IsNull(rstProductData.Fields(j).Value), 0
rstProductData.Fields(j).Value)
Next j

I'm not sure what further details are needed to diagnose the problem s
please let me know.

Thanks for any help

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 08:23 AM.

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