VBA Causing Debug Issues

jamesmev

Board Regular
Joined
Apr 9, 2015
Messages
136
I am using the below code. However, when I delete any contents from any cell I am getting a debug error. Can't figure out why.

Private Sub Worksheet_Change(ByVal Target As Range)


'search
If Target = Range("Q11") Then
If InStr(1, Range("Q11"), "Search") > 0 Then Search
End If

End Sub

--- then search calls a macro.
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
16,835
Office Version
2010
Platform
Windows
What is the debug error you get and what line is highlighted?
 

Watch MrExcel Video

Forum statistics

Threads
1,099,085
Messages
5,466,540
Members
406,486
Latest member
varmehta

This Week's Hot Topics

Top