Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have this loop below that I programmed on my machine at home, but when I take the same file I run it on at home and the same code and plug it in on another machine at home or even my machine at work I get an error that points to the 'If rng.Value < "0" Then line that says Run-time error '13': Type mismatch Code: -------------------- For i = LaRow To 2 Step -1 Set rng = Range("T" & i) If rng.Value < "0" Then Range("A" & i & ":AE" & i).Interior.ColorIndex = 38 Range("A" & i & ":AE" & i).Interior.Pattern = xlSolid Range("AR" & i).Value = "1" End If Next -------------------- Earlier in the code I have the values in Column T formatted into currency, like so. Code: -------------------- Range("T" & i).Style = "Currency" -------------------- Maybe that has something to do with it? Any help on this error is appreciated. Thanks in advance. -- DKY ------------------------------------------------------------------------ DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=393837 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Type mismatch" when I try to fill an Array variable with "+" | Excel Discussion (Misc queries) | |||
multiple file uploading - runtime error'13': type mismatch "While Counter <= UBound(FName)" | Excel Discussion (Misc queries) | |||
Run-time Error "13" - File Type Mismatch | Excel Programming | |||
"FIND" generates "Type mismatch" error | Excel Programming | |||
Copying data to another worksheet gives "Type Mismatch" error | Excel Programming |