Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Tricky data type error
Was caught out by something tricky that I thought might be worth it to pass
on. Had coded, simplified, this code: Sub test() Dim strTest As String If strTest = 4 Then MsgBox strTest End If End Sub Strangely, this sometimes compiles and sometimes doesn't. Unfortunately, it did with me, but it can't run as there obviously will be an error: Type mismatch (Error 13) Strangely also it can sometimes run on Excel 2003, but as far as I can see never on 2000. Just completely unpredictable. Would there be a way to catch out this coding error reliably at compile time? RBS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error: Value in Formula of wrong data type | Excel Worksheet Functions | |||
Strange data type error | Excel Programming | |||
Dictionary object: Error assigning user defined data type to item | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Type Mismatch Error when getting data from another workbook | Excel Programming |