M
mwc0914
I have my workbook open. I want to open a new workbook, copy the dat
from my active sheet to the active sheet of the new workbook, then sav
the new workbook with a file name that is the value in a cell on m
original active sheet. I understand that the new workbook will be save
in the same directory where my original workbook is located.
When recording a macro, here is what I come up with. I think all I'
missing is the file name parameter in the save portion (where I hav
the ???).
Workbooks.Add
Windows("Book1").Activate
Sheets("Sheet 1").Select
Range("A1:A3").Select
Selection.Copy
Windows("Book2").Activate
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"???", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
Windows("Book1").Activat
from my active sheet to the active sheet of the new workbook, then sav
the new workbook with a file name that is the value in a cell on m
original active sheet. I understand that the new workbook will be save
in the same directory where my original workbook is located.
When recording a macro, here is what I come up with. I think all I'
missing is the file name parameter in the save portion (where I hav
the ???).
Workbooks.Add
Windows("Book1").Activate
Sheets("Sheet 1").Select
Range("A1:A3").Select
Selection.Copy
Windows("Book2").Activate
Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"???", FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
Windows("Book1").Activat