willspill
01-03-2020, 05:28 AM
Hi,
I am trying to use a batch script to run my macro in Excel. I currently have it so the macro runs on opening the workbook, however, I was wondering if it was possible to write data into cells using the batch file as well. I have tried using the line:
"C:\Program Files (x86)\Microsoft Office\Office14\excel.exe" "M:\1\LayerImageMacro8.xlsm" /e(no_plots_run="8")(no_frames="10")(folder_path="M:\1\Example")(file_name="plot-001-")(input_file_type=".png")(output_file_type=".png")
Where no_plots_run, no_frames, folder_path, file_name, input_file_type and output_file_type are all named cells. However, this returns with the an error message saying that the file name could not be found. I am very new to this sort of thing and can't find anything online to help.
Any ideas?
I am trying to use a batch script to run my macro in Excel. I currently have it so the macro runs on opening the workbook, however, I was wondering if it was possible to write data into cells using the batch file as well. I have tried using the line:
"C:\Program Files (x86)\Microsoft Office\Office14\excel.exe" "M:\1\LayerImageMacro8.xlsm" /e(no_plots_run="8")(no_frames="10")(folder_path="M:\1\Example")(file_name="plot-001-")(input_file_type=".png")(output_file_type=".png")
Where no_plots_run, no_frames, folder_path, file_name, input_file_type and output_file_type are all named cells. However, this returns with the an error message saying that the file name could not be found. I am very new to this sort of thing and can't find anything online to help.
Any ideas?