E
Ed Davis
This keeps bombing out on me with a compile error. It happens at the
following place:
Set DestCell = .Range("A34").End(x1Down).Offset(1, 0)
Can someone help me to get this correct.
What I want it to do is the following:
I want to copy the value of a date In Sheet 1 in the cell D4
and the destination will be in the sheet with the name that is located in
Sheet 1 at cell C34.
and the date should go after going to the first empty cell after A34.
Sub Save_Day2()
'
' Save_Day2 Macro
Dim RngToCopy As Range
Dim DestCell As Range
'
'
' Copy Date
Set RngToCopy = Sheets("Sheet1").Range("D4")
On Error Resume Next
With ThisWorkbook.Worksheets
.Item(.Item("Sheet1").Range("C34").Value).Select
End With
If Err.Number <> 0 Then
MsgBox Err.Description
End If
Set DestCell = .Range("A34").End(x1Down).Offset(1, 0)
RngToCopy.Copy
DestCell.PasteSpecial Paste:=x1PasteValues, Operation:=x1None, _
SkipBlanks:=False, Transpose:=False
following place:
Set DestCell = .Range("A34").End(x1Down).Offset(1, 0)
Can someone help me to get this correct.
What I want it to do is the following:
I want to copy the value of a date In Sheet 1 in the cell D4
and the destination will be in the sheet with the name that is located in
Sheet 1 at cell C34.
and the date should go after going to the first empty cell after A34.
Sub Save_Day2()
'
' Save_Day2 Macro
Dim RngToCopy As Range
Dim DestCell As Range
'
'
' Copy Date
Set RngToCopy = Sheets("Sheet1").Range("D4")
On Error Resume Next
With ThisWorkbook.Worksheets
.Item(.Item("Sheet1").Range("C34").Value).Select
End With
If Err.Number <> 0 Then
MsgBox Err.Description
End If
Set DestCell = .Range("A34").End(x1Down).Offset(1, 0)
RngToCopy.Copy
DestCell.PasteSpecial Paste:=x1PasteValues, Operation:=x1None, _
SkipBlanks:=False, Transpose:=False