ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error control no work :( (https://www.excelbanter.com/excel-programming/320613-error-control-no-work.html)

CodeSponge[_2_]

Error control no work :(
 
This little code snippet is meant to convert all the string numbers to
doubles in part of a list I import from an intranet site and delete the
rows that arn't convertable. Its worked fine for weeks but for some
reason it won't break on the error now. it just pops up a type mismatch
box. Its got me scratching my head. Any ideas?

tank ya,
Shaun


' On Error GoTo ErrorNAN
' For Each ticket In Range( ... ).Rows
' With ticket
' .columns(NATL).Value = CDbl(.columns(NATL).Value) '<==
this is where the error pops up after it fins a work not a number
' .columns(CNUM).Value = CDbl(.columns(CNUM).Value)
' End With
' If False Then
'ErrorNAN: ticket.Delete
' End If
' Next
' On Error GoTo 0


Tom Ogilvy

Error control no work :(
 
In the VBE under Tools=Options on the General Tab, do you have Break on All
errors selected. You need to have break on unhandled errors selected.

--
Regards,
Tom Ogilvy

"CodeSponge" wrote in message
ups.com...
This little code snippet is meant to convert all the string numbers to
doubles in part of a list I import from an intranet site and delete the
rows that arn't convertable. Its worked fine for weeks but for some
reason it won't break on the error now. it just pops up a type mismatch
box. Its got me scratching my head. Any ideas?

tank ya,
Shaun


' On Error GoTo ErrorNAN
' For Each ticket In Range( ... ).Rows
' With ticket
' .columns(NATL).Value = CDbl(.columns(NATL).Value) '<==
this is where the error pops up after it fins a work not a number
' .columns(CNUM).Value = CDbl(.columns(CNUM).Value)
' End With
' If False Then
'ErrorNAN: ticket.Delete
' End If
' Next
' On Error GoTo 0





All times are GMT +1. The time now is 09:29 PM.

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