Hello:
I need a VB Code to backup employee schedule.
I am using below code but it malfunction and not copying correctly.
I only wants to copy the value and not the formula.
Let me know if you have any questions.
Thanks.
Riz
Sub Backup()
Dim ws As Worksheet, wb As Worksheet, r As Long
Set ws = ActiveWorkbook.Sheets("Work Schedule")
r = Range("D3:D3")
'Set wb = ActiveWorkbook.Sheets("Backup")
Set wb = Sheets("Backup")
With Application
.Calculation = xlCalculationManual
.ScreenUpdating = False
.EnableEvents = False
.DisplayAlerts = False
End With
wb.Range("B" & r).Value = ws.Range("B3:P32").Value
With Application
.Calculation = xlCalculationAutomatic
.ScreenUpdating = True
.EnableEvents = True
.DisplayAlerts = True
End With
End Sub
Bookmarks