typo: TheColmn is not used, should the first line be:
Case "FIRST", "": TheCol = "I": TheCol1 = "J"
?
Kash;723181 Wrote:
Its giving me a run time error..
my code
-------------------
Case "FIRST", "": TheCol = "I": TheColmn = "J"
Case "SECOND": TheCol = "L": TheCol1 = "M"
Case Else 'the default/error option
'TheCol = "J"
MsgBox "Check cell C2 on the Search sheet"
Exit Sub
End Select
For lngRow = 1 To lngLastRow
If (Sheets("Details").Range("H" & lngRow) Date - 90 Or
Len(.Range("E4").Value) = 0) And _
(Sheets("Details").Range("F" & lngRow) = .Range("E2") Or
Len(.Range("E2").Value) = 0) And _
(Sheets("Details").Range(TheCol & lngRow) = .Range("C4") Or
Len(.Range("C4").Value) = 0) And _
(Sheets("Details").Range(TheCol1 & lngRow) = .Range("C6") Or
Len(.Range("C6").Value) = 0) Then
--
p45cal
*p45cal*
------------------------------------------------------------------------
p45cal's Profile:
http://www.thecodecage.com/forumz/member.php?u=558
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=202176
http://www.thecodecage.com/forumz