Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello-
I would like the code below to not go in debug mode if the variable a is not found. What is the code I should insert? Thank you! Public Sub Macro1() Dim nRow As Integer, i As Integer, a As String If Not Intersect(activecell, Range("A1:E77")) Is Nothing Then a = Left(activecell.Offset(0, 5).Text, 9) Sheets("MTD-DTB").Select Range("A1").Select Cells.Find(What:=a, After:=activecell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate nRow = activecell.Row For i = nRow To 1000 If Range("B" & i).Value = a Then Range("A" & nRow, "G" & i).Select End If Next i End sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Exiting Excel | Excel Discussion (Misc queries) | |||
Exiting a Textbox | Excel Programming | |||
Exiting Worksheet | Excel Discussion (Misc queries) | |||
Exiting a workbook | Excel Programming | |||
Exiting a workbook | Excel Programming |