Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Type mismatch problem?
I am having a big problem.
I have the following loop FlCellCount = 2 IntEnd = 100 Do While newBook.Worksheets(Sh).Cells(FlCellCount, 2) < (IntEnd 1000) IntSizeCnt = IntSizeCnt + 1 FlCellCount = FlCellCount + 1 Loop Now everything has worked fine for like a month but I found that thi is causing problems on a particular data. I have a book with 2 worksheets and basically this loop will go throug one of the sheets and check, line by line, which ones are under 100000. It has worked fine until I tried in a sheet with 4 rows of values, wha happens is that it'll start looping and keep on going (And not qui after FlCellCount = 6 since after line 5 the whole sheet is full o empty cells) until it jumps out of the sub (Instead of going further and going to the line under the Sub call. I tried debugging and if I stop the mouse over the "Cells" nothing i shown (instead of showing the value for that exactly cell). Now I changed the Cells part to a Range, and now when I stop the mous over it (Upon debugging) it shows "Type mismatch". There is nothing wrong with the sheet, column B contains values lowe than 100000 (First value is 15505 in B2) and as I said it only happen to a specific sheet, all other sheets I tried (With the exact same kin of data) works fine and the loop stops upon finding a line with a valu over 100000 and the sub continues. Anybody got an idea of what could be happening? Best Regards Noo -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Type Mismatch | Excel Worksheet Functions | |||
Type mismatch | Excel Programming | |||
Type mismatch | Excel Programming | |||
Type Mismatch | Excel Programming |