If I have a Sub that has 2 Optional arguments. Can I run that Sub directly without having to use the Call Statement from another Sub?
Basically, I created a Sub that builds a report from other workbooks using yesterday's date automatically (*the date is found in the other workbook's filenames that I pull the data from). But, I wanted to possibly give the option to be able to prompt the user for a Date to run the report for. The reason for the extra sub that could be run separately to prompt for input is because I plan to try and automate the main Sub/Macro to run using a Script and Task Scheduler.
I noticed if I modify my main sub that builds the report and add optional arguments to the sub BuildReport(....)
line, I cannot directly run that sub any longer. Remove the args and I can run it again.
I thought if the args were set to "Optional" args I'd be able to run it still without using a "Call" from another Sub.
Is this correct that a sub with ANY args, optional or not, cannot be run directly?