vvSTRIDEvv
Board Regular
- Joined
- Jun 17, 2010
- Messages
- 74
I am trying to copy/paste some data from one sheet to another.
The ranges are always different, so I'd need VBA to determine the range to copy as well as the paste area.
Here is what I have so far, and it is not working. I don't get any error's, just nothing happens...
Please have a look, and let me know where I've gone wrong...
Thanks
The ranges are always different, so I'd need VBA to determine the range to copy as well as the paste area.
Here is what I have so far, and it is not working. I don't get any error's, just nothing happens...
Please have a look, and let me know where I've gone wrong...
Code:
Dim firstrow As String
Dim lastrow As String
Dim wsh1 As Worksheet
Dim wsh2 As Worksheet
wsh1 = Worksheets("strsiteid")
wsh2 = Worksheets("Dashboard")
firstrow = wsh1.UsedRange.Rows(1).Row
lastrow = wsh1.UsedRange.Rows(ActiveSheet.UsedRange.Rows.Count).Row
Range(firstrow, lastrow).Copy _
Destination:=wsh2.Range("C" & wsh2.Rows.Count).End(xlUp).Offset(1, 0)