DevanG
06-23-2011, 05:43 AM
So, I run a function and want to return a value. When running the function I open up two other workbooks, one closes and leaves the value in the other. Problem is, the whole code stops once they run. I think its because the one that closes has another button you have to press to finish it. How do I get around this? go back to my orginal code?
RKrev = RunRepricing(InvestAllo, TheFile)
Workbooks(Summary).Activate
Workbooks(Summary).Sheets(1).Range("T5").Value = RKrev
At the end of RunRepricing, the sub of the other workbook is run, then its SUPPOSED to close the other opened workbook. That never happens. Then it never performs the two lines after it.
RKrev = RunRepricing(InvestAllo, TheFile)
Workbooks(Summary).Activate
Workbooks(Summary).Sheets(1).Range("T5").Value = RKrev
At the end of RunRepricing, the sub of the other workbook is run, then its SUPPOSED to close the other opened workbook. That never happens. Then it never performs the two lines after it.