Greater than
You are missing sheet names and MasterSheet may need double quotes. See
comments below
'change sheet anem as required
with workbooks("TempData.XLS").sheets("Sheet1")
if .Range("D21") 0 then
.Range("D21:D23").Copy
'Is MasterSheet a variable name. I put double quotes
'Change sheet name as required
workbooks("MasterSheet").sheets("Sheet1").Range("A D21") _
.PasteSpecial Paste:=xlFormulas
end if
end with
"oldjay" wrote:
Whats wrong with this?
Windows("TempData.XLS").Activate 'Recalls scrap rates
If D21 0 Then
Range("D21:D23").Select
Selection.Copy
Windows(MasterSheet).Activate
Range("AD21").Select
Selection.PasteSpecial Paste:=xlFormulas
End If
|