Hi
I have the following macro and keep getting a compile error.
Any Ideas?
Sub test()
Dim sName As Variant, bFolder As String, dest As String
sName = InputBox("Subfolder name")
If sName = "" Then Exit Sub
bFolder = "X:\backup"
If Dir(bFolder & "" & sName, vbDirectory) = "" Then
MkDir bFolder & "" & sName
End If
dest = bFolder & "" & sName
ActiveWorkbook.Sheets(Array("Week1", "Week 2", "Week 3", "Week 4” "Period Summary", "Sheet1")).Copy
ActiveWorkbook.SaveAs dest & "\NewWorkbook", ActiveWorkbook.FileFormat
End Sub
I have the following macro and keep getting a compile error.
Any Ideas?
Sub test()
Dim sName As Variant, bFolder As String, dest As String
sName = InputBox("Subfolder name")
If sName = "" Then Exit Sub
bFolder = "X:\backup"
If Dir(bFolder & "" & sName, vbDirectory) = "" Then
MkDir bFolder & "" & sName
End If
dest = bFolder & "" & sName
ActiveWorkbook.Sheets(Array("Week1", "Week 2", "Week 3", "Week 4” "Period Summary", "Sheet1")).Copy
ActiveWorkbook.SaveAs dest & "\NewWorkbook", ActiveWorkbook.FileFormat
End Sub