Hello all,
I made one excel macro enabled workbook file (xlsm) in which i have some foundation calculation. In it, I created a complicated macro, that frees file from all unnecessary sheets, other macros, calculations, etc., and on the only remaining sheet, it only attaches values in all cells regardless of formulas. In other words, it would be a file from which I would print my calculation or a file that I would share with others without them using my created macros and calculations. The problem is that when I start that macro my original file is lost and I can't change the calculations and use former macros anymore.
I would greatly appreciate it, if someone could help me to redefine my macro, adding some lines at the beginning and in the end, so that two new files can be created from the existing file, using the rules explained below.
The first file should be same as the original file, just saved under a different name and remains open after finishing the macro command. The new file name must be the combination of the value from active sheet cell A1, text defined as "-", and the value from active sheet cell A2, and should be displayed like this "activesheetcellvalueA1 - activesheetcellvalueA2.xlms ". The file must be saved in the same folder where original file was.
The second file should be obtained from a copy of the first file. In second file, first i need my macro to be applied, and after that, the file must be saved with new name and closed after finishing the macro command. The new file name must be the combination of the value from active sheet cell B1, text defined as "-", and the value from active sheet cell B2, and should be displayed like this "activesheetcellvalueB1 - activesheetcellvalueB2.xlsx ". The file must be saved in the subfolder PRINT of folder where original file was. If the PRINT subfolder does not exist, the macro should created it.
Please, mark me the line where to put my original macro inside redefined one.
Please note my macro is written for active file so the second file must be active for use.
Also note that it will be very nice if macro could make everything hidden while making second file (that there is no visible opening of duplicate file in windows)
I hope you understand me. If there are any questions, I am available
Thank you
I made one excel macro enabled workbook file (xlsm) in which i have some foundation calculation. In it, I created a complicated macro, that frees file from all unnecessary sheets, other macros, calculations, etc., and on the only remaining sheet, it only attaches values in all cells regardless of formulas. In other words, it would be a file from which I would print my calculation or a file that I would share with others without them using my created macros and calculations. The problem is that when I start that macro my original file is lost and I can't change the calculations and use former macros anymore.
I would greatly appreciate it, if someone could help me to redefine my macro, adding some lines at the beginning and in the end, so that two new files can be created from the existing file, using the rules explained below.
The first file should be same as the original file, just saved under a different name and remains open after finishing the macro command. The new file name must be the combination of the value from active sheet cell A1, text defined as "-", and the value from active sheet cell A2, and should be displayed like this "activesheetcellvalueA1 - activesheetcellvalueA2.xlms ". The file must be saved in the same folder where original file was.
The second file should be obtained from a copy of the first file. In second file, first i need my macro to be applied, and after that, the file must be saved with new name and closed after finishing the macro command. The new file name must be the combination of the value from active sheet cell B1, text defined as "-", and the value from active sheet cell B2, and should be displayed like this "activesheetcellvalueB1 - activesheetcellvalueB2.xlsx ". The file must be saved in the subfolder PRINT of folder where original file was. If the PRINT subfolder does not exist, the macro should created it.
Please, mark me the line where to put my original macro inside redefined one.
Please note my macro is written for active file so the second file must be active for use.
Also note that it will be very nice if macro could make everything hidden while making second file (that there is no visible opening of duplicate file in windows)
I hope you understand me. If there are any questions, I am available
Thank you