Hi guys,
Very new to writing macros, I'm trying to automate the copy/paste/save of input and output data but I keep locking myself out of my Calculations workbook in the process !
Context: I have the parent folder directory "...\Macro Test\" which contains 2 folders "Input" and "Output" and 1 workbook "Test Spreadsheet 3.xlsx". "Test Spreadsheet 3.xlsx" contains calculations and transforms the input data.
In the "Input" folder are X workbooks containing raw data and the "Output" folder is empty.
I've been trying to write a macro that does the following steps:
1. Makes a copy of "Test Spreadsheet 3.xlsx" from the parent directory ("...\Macro Test\") to the "Output" folder (turn animations off)
2. Open the first workbook in the "Input" folder (turn autosave off)
3. Copy columns A:K from the first worksheet of the first input workbook (from step 2.)
4. Paste (from step 3.) as value into cell A1 of the first worksheet of "Test Spreadsheet 3.xlsx" workbook (from step 1.) (turn autosave off) Note, the first worksheet of "Test Spreadsheet 3.xlsx" has conditional formatting that I do not wish to override
5. Save "Test Spreadsheet 3.xlsx" (from step 1.) and rename it as the input workbook (from step 2.) &"-Checks" and close
6. Close the input workbook (from step 2.), do not save any changes
7. Loop steps 1 to 6 for all other '.xlsx' in the "Input" folder
8. Turn animations back on and output msgbox saying "Done!"
If anyone could help me understand the steps in VBA, it'd be greatly appreciated.
Very new to writing macros, I'm trying to automate the copy/paste/save of input and output data but I keep locking myself out of my Calculations workbook in the process !
Context: I have the parent folder directory "...\Macro Test\" which contains 2 folders "Input" and "Output" and 1 workbook "Test Spreadsheet 3.xlsx". "Test Spreadsheet 3.xlsx" contains calculations and transforms the input data.
In the "Input" folder are X workbooks containing raw data and the "Output" folder is empty.
I've been trying to write a macro that does the following steps:
1. Makes a copy of "Test Spreadsheet 3.xlsx" from the parent directory ("...\Macro Test\") to the "Output" folder (turn animations off)
2. Open the first workbook in the "Input" folder (turn autosave off)
3. Copy columns A:K from the first worksheet of the first input workbook (from step 2.)
4. Paste (from step 3.) as value into cell A1 of the first worksheet of "Test Spreadsheet 3.xlsx" workbook (from step 1.) (turn autosave off) Note, the first worksheet of "Test Spreadsheet 3.xlsx" has conditional formatting that I do not wish to override
5. Save "Test Spreadsheet 3.xlsx" (from step 1.) and rename it as the input workbook (from step 2.) &"-Checks" and close
6. Close the input workbook (from step 2.), do not save any changes
7. Loop steps 1 to 6 for all other '.xlsx' in the "Input" folder
8. Turn animations back on and output msgbox saying "Done!"
If anyone could help me understand the steps in VBA, it'd be greatly appreciated.