Thread
:
Code Problem
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Code Problem
The patient said "Doctor, it hurt when I do this". The doc said "Don't do
that"
--
Don Guillett
SalesAid Software
"Tom Ogilvy" wrote in message
...
If multiple cells are selected, this will produce a type mismatch error.
--
Regards,
Tom Ogilvy
"Don Guillett" wrote in message
...
try
If Target.Rows.Count 1 or target="" Then
--
Don Guillett
SalesAid Software
"TC" wrote in message
m...
I'm running this code to select from one worsheet a row that places
data on another sheet. The code works great until I click on a blank
row. I get a run time error subscript out of range. Here is the code
can anyone help?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Rows.Count 1 Then Exit Sub
Application.EnableEvents = False
*Debugshere Target.EntireRow.Copy Worksheets(Cells(Target.Row,
1).Value).Rows(1)
Application.EnableEvents = True
End Sub
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]