Kim,
How have you declare your other variables. If you declared one as
Integer, change it to Long.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Kim" wrote in message
...
hi. im trying to run a macro and it works perfectly till about
row 30,197
then it crashes and gives a runtime 6 error (overflow).
Dim g As Double
For g = b To Sheet1.Rows.Count
If UCase(Trim(Sheet1.Cells(g,
nSecondDefnColBegin).Value)) =
firstcell Then
nSecondDefnRow = g
Let b = g
Exit For
End If
Next g
the error happens in the row nSecondDefnRow = g. Any reasons
why this
happens? and how can i fix the problem? Thanks.
Kim