Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to run several consective tests on "curcell". Select case seemed less
messy than nested if-then. However I am getting the above error on the ** line. Help appreciated Dim curcell As Range Dim sht As Worksheet For Each sht In ActiveWorkbook.Worksheets For Each curcell In sht.UsedRange.Cells Select Case curcell.Column Case Is < 1 Select Case curcell.Row Case Is < 1 Select Case TypeName(curcell.Offset(-1, 0)) **Case Is = "String" Or "Date" Select Case TypeName(curcell.Offset(0, -1)) Case Is = "String" Or "Date" Select Case curcell.Offset(-1, 0).Value Case Is < 2002 Or 2003 Or 2004 Or 2005 Or 2006 Or 2007 _ Or 2008 Or 2009 MsgBox curcell.Address Exit For End Select End Select End Select End Select End Select Next curcell Next sht |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Visual Basic Error Run Time Error, Type Mismatch | Excel Discussion (Misc queries) | |||
runtime error 13 - type mismatch error in Excel 97 on Citrix | Excel Programming | |||
simple: type mismatch | Excel Programming | |||
Help: Compile error: type mismatch: array or user defined type expected | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming |