Hello Sir i m useing a VBA i wanna Add a macro in this VBA which is following
After Copy range data from one sheet to another sheet... We cheack entire sheet.. if any row or rows found complicity Blank Than macro Remove That Road or Roads Automatically....
Pls add that code line in following code so that we can paste in my file..
Private Sub Worksheet_Change(ByVal Target As Range)
'stop anything re-triggering this event macro
Application.EnableEvents = False
On Error GoTo ErrHnd
'test if changed cell is in column J (col. 10) and it contains Y (or y)
If Target.Column = 10 And UCase(Target.Text) = "Y" Then
Dim rngCell As Range
Dim rngDest As Range
Dim nubRows As Long
Dim strRowAddr As String
'save target row address
strRowAddr = Target.Address
Dim j As Integer
Sheets(1).Range("A6:j55").Copy
Sheets("Prarup-1").Range("d" & CStr(Application.Rows.Count)).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues, Transpose:=False
Sheets(1).Range("A65:AW65").Copy
Sheets("Work").Range("B" & CStr(Application.Rows.Count)).End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues, Transpose:=False
Target.EntireRow.Copy Destination:=rngDest
'remove the cut/copy range marquee
Application.CutCopyMode = False
End If
Application.EnableEvents = True
Exit Sub
'error handler
ErrHnd:
Err.Clear
Application.EnableEvents = True
End Sub
Thanks in Advance
Bookmarks