F
FIRSTROUNDKO via OfficeKB.com
HI!,
I am trying to find a date from an activecell but i get the error message
"object variale or with block variable not set"
From the bellow Sub
Sub MENB()
Dim LASTROW As Long
Dim abcd As range
Sheets("MONTHS TO UPDATE").Select
LASTROW = Cells(Rows.Count, 1).End(xlUp).Row
For nb = LASTROW To 1 Step -1
Cells(nb, 1).Select
If Cells(nb, 2).Value Like "*X" Then
GoTo GETOUT
End If
Next nb
GETOUT:
Set abcd = ActiveCell
Sheets("Copy Paste Special").Select
Range("a1").Select
Cells.Find(What:=abcd, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub
I am trying to find a date from an activecell but i get the error message
"object variale or with block variable not set"
From the bellow Sub
Sub MENB()
Dim LASTROW As Long
Dim abcd As range
Sheets("MONTHS TO UPDATE").Select
LASTROW = Cells(Rows.Count, 1).End(xlUp).Row
For nb = LASTROW To 1 Step -1
Cells(nb, 1).Select
If Cells(nb, 2).Value Like "*X" Then
GoTo GETOUT
End If
Next nb
GETOUT:
Set abcd = ActiveCell
Sheets("Copy Paste Special").Select
Range("a1").Select
Cells.Find(What:=abcd, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate
End Sub