Hello
I have a code that opens a new workbook and saves the a file based on the value of a cell. I am saving it in the current folder.
I made some minor changes and now it won't work.
I can't figure it out.
I would appreciate any help
The following is my code.
Thanks in advance
Sub ()
Application.SheetsInNewWorkbook = 1
Workbooks.Add
ActiveCell.FormulaR1C1 = _
"='[Q1 2015 Aetna MA rev2.xlsm]1. Cover Page'!R100C3"
'REM Range("A1").Select
'REM Selection.Copy
'REM Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & ThisFile, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
I have a code that opens a new workbook and saves the a file based on the value of a cell. I am saving it in the current folder.
I made some minor changes and now it won't work.
I can't figure it out.
I would appreciate any help
The following is my code.
Thanks in advance
Sub ()
Application.SheetsInNewWorkbook = 1
Workbooks.Add
ActiveCell.FormulaR1C1 = _
"='[Q1 2015 Aetna MA rev2.xlsm]1. Cover Page'!R100C3"
'REM Range("A1").Select
'REM Selection.Copy
'REM Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & ThisFile, FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub