Klartigue
09-19-2011, 11:13 AM
I have copied and pasted some data into the attached worksheet using the code:
Sub CopyAndPaste()
Dim LastRow As Long
Windows("Volume worksheet.xlsx").Activate
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("A2:I2").Resize(.Range("A2").End(xlDown).Row - 1).Copy
Windows("Broker Volume Master.xlsx").Activate
.Paste Workbooks("Broker Volume Master.xlsx").ActiveSheet.Range("A2:I2").End(xlUp).Offset(1)
Application.Run "BLPLinkReset"
End With
End Sub
However, I only want to paste the selected data (A1 to A23). But when its pasted, all these N/A and brus values show up in columns A and E respectively. I dont know why they are showing up. Can I alter my macro to get them to go away?
Thanks for the help!!
Sub CopyAndPaste()
Dim LastRow As Long
Windows("Volume worksheet.xlsx").Activate
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
.Range("A2:I2").Resize(.Range("A2").End(xlDown).Row - 1).Copy
Windows("Broker Volume Master.xlsx").Activate
.Paste Workbooks("Broker Volume Master.xlsx").ActiveSheet.Range("A2:I2").End(xlUp).Offset(1)
Application.Run "BLPLinkReset"
End With
End Sub
However, I only want to paste the selected data (A1 to A23). But when its pasted, all these N/A and brus values show up in columns A and E respectively. I dont know why they are showing up. Can I alter my macro to get them to go away?
Thanks for the help!!