bopha99
08-25-2017, 10:03 AM
Hello,
From the help of offthelip, I've got a VBA code that works on multiple worksheets in a single workbook. What would be great addition would be another VBA code that would be able to refresh and reset each worksheet in each workbook and then run each VBA code in each workbook automatically so that I would not have to open each Excel spreadsheet and manually run the VBA code.
What I'm trying to create with a refresh and reset each worksheet function is basically a VBA function that will restore the original formula that was once in the cell prior to the VBA code "hard coding" something over it. I would like to basically create a template and have the cash flow models feed off this template so that I could run the VBA code from it from a clean worksheet that has not been hard coded by the VBA code.
Essentially what I'm saying is that if I were to have 10 sheets or more of this cash flow and the VBA code, if I were to run the VBA code once, it would hard code correctly like it should, but then I would not be able to re-use these 10 sheets for another cash flow scenario. This can be a problem if I were to have 50 workbooks that were all feeding from a single template. Does this make sense?
I am trying to create a group of workbooks where the VBA code can be reused after it has run once based on a different cash flow scenario. See the attached excel file and the VBA code with it. In the excel file, income rows 3-6 and rows 13-19 feed off rows 79-82 and rows 84-90. If I were to run the VBA code, it would hardcode over this feed correctly, but then I would not be able to re-use the sheet over because of the hard coding. Is there a way to reverse the VBA code to get the original sheet back?
Thanks in advance for your help.
From the help of offthelip, I've got a VBA code that works on multiple worksheets in a single workbook. What would be great addition would be another VBA code that would be able to refresh and reset each worksheet in each workbook and then run each VBA code in each workbook automatically so that I would not have to open each Excel spreadsheet and manually run the VBA code.
What I'm trying to create with a refresh and reset each worksheet function is basically a VBA function that will restore the original formula that was once in the cell prior to the VBA code "hard coding" something over it. I would like to basically create a template and have the cash flow models feed off this template so that I could run the VBA code from it from a clean worksheet that has not been hard coded by the VBA code.
Essentially what I'm saying is that if I were to have 10 sheets or more of this cash flow and the VBA code, if I were to run the VBA code once, it would hard code correctly like it should, but then I would not be able to re-use these 10 sheets for another cash flow scenario. This can be a problem if I were to have 50 workbooks that were all feeding from a single template. Does this make sense?
I am trying to create a group of workbooks where the VBA code can be reused after it has run once based on a different cash flow scenario. See the attached excel file and the VBA code with it. In the excel file, income rows 3-6 and rows 13-19 feed off rows 79-82 and rows 84-90. If I were to run the VBA code, it would hardcode over this feed correctly, but then I would not be able to re-use the sheet over because of the hard coding. Is there a way to reverse the VBA code to get the original sheet back?
Thanks in advance for your help.