Dear All,
I need to copy and move a worksheet and save as values in a new workbook. I'm almost done just beside the pasting as values. I would appreciate much your help on that:
I need to copy and move a worksheet and save as values in a new workbook. I'm almost done just beside the pasting as values. I would appreciate much your help on that:
Code:
Sub moving()
Dim varPath As String
Dim WbOpen As Workbook
Set WbOpen = Workbooks.Add
varPath = codedraft.Range("b14").Value
datadraft.Copy before:=WbOpen.Sheets(1)
Application.DisplayAlerts = False
WbOpen.SaveAs varPath & "\General-" & Format(Date, "dd-mmm-yyyy") & ".xlsx"
Application.DisplayAlerts = True
WbOpen.Close
End Sub