F
fishy
I have the following macro that copies data from the 'Daily Team Performance'
sheet and then dependant on the content of cell B4 on that sheet, should copy
this data to the respective named sheet on the 'buzz' workbook.
The problem is that when I try to run it I get the 'Invalid Qualifier'
message here: Set rDestination = Destsheet.Range("B4")...
Can anyone see what I am doing wrong as the other option is screeds of code
for every variation.
Sub UpdateData()
Dim Destsheet As String
Destsheet = Range("Daily Team Performance!B4")
Dim rSource As Excel.Range
Dim rDestination As Excel.Range
Set rSource = ActiveSheet.Range("Daily Team Performance!B4:M103")
Set rDestination = Destsheet.Range("B4")
rSource.Copy
rDestination.Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
valKill:
Set rSource = Nothing
Set rDestination = Nothing
Exit Sub
End Sub
sheet and then dependant on the content of cell B4 on that sheet, should copy
this data to the respective named sheet on the 'buzz' workbook.
The problem is that when I try to run it I get the 'Invalid Qualifier'
message here: Set rDestination = Destsheet.Range("B4")...
Can anyone see what I am doing wrong as the other option is screeds of code
for every variation.
Sub UpdateData()
Dim Destsheet As String
Destsheet = Range("Daily Team Performance!B4")
Dim rSource As Excel.Range
Dim rDestination As Excel.Range
Set rSource = ActiveSheet.Range("Daily Team Performance!B4:M103")
Set rDestination = Destsheet.Range("B4")
rSource.Copy
rDestination.Select
Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
valKill:
Set rSource = Nothing
Set rDestination = Nothing
Exit Sub
End Sub