Insert/delete rows
If Not Intersect(selection,Range("B9")) is Nothing then
MsgBox "Please do not select to insert or delete from this row" &
vbNewLine & _
"" & vbNewLine & _
" Please un-select and try again" & vbNewLine & _
" ", , "ERROR"
Exit Sub
End If
or do you want to guard against any row insertion above or at row 9
If Selection.Row <= 9 then
--
Regards,
Tom Ogilvy
"JohnUK" wrote in message
...
Hi again,
I have another problem to solve. The code below is my attempt to stop a
macro from inserting or deleting rows if B9 was included, but for some
reason
its not behaving as I thought it would. What am I doing wrong?
If ActiveCell = B9 Then
MsgBox "Please do not select to insert or delete from this row" &
vbNewLine & _
"" & vbNewLine & _
" Please un-select and try again" & vbNewLine & _
" ", , "ERROR"
Exit Sub
End If
Many thanks in advance
John
|