LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Code Problem

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code problem puiuluipui Excel Discussion (Misc queries) 3 July 3rd 09 07:27 PM
VB Code Problem Stan Excel Discussion (Misc queries) 6 April 25th 07 01:48 AM
Problem with VBA Code? Steve[_71_] Excel Programming 7 November 1st 04 03:39 PM
Code problem Rick[_11_] Excel Programming 1 August 8th 03 04:25 AM
Code Problem ! Mike R Excel Programming 5 August 5th 03 03:35 PM


All times are GMT +1. The time now is 12:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"