I have a workbook1 where I am using RTD to get the value of an index and that is working fine
I have a separate workbook2 where I want to save that value as a static value so it will not change after it is saved
I have 9 separate worksheets in this workbook2 where I save each RTD value
The VBA macro I am using is in workbook2 is opening workbook1 and it is copying a range of cells which includes this RTD value and is pasting it in workbook2
Here is the problem I am having
I made a vba macro for each separate sheet and that is working normally and it is saving the value from workbook1
So trying to save a few steps I am trying to consolidate all the separate macros into one so I copied and pasted each macro into one so it runs one after the other
The problem is that the value in the first sheet of workbook2 is correct and than everything after that shows 0 in the rest of the worksheets
Another oddball thing is that after I run the code that runs it one after the other and I try to run the second one separately now the value is still 0
So in order to make it work I have to open workbook1 let the RTD value update and than save it and than it works if I run it separately but not if run the exact same code one after the other
I am running this code to open the workbook Workbooks.Open "Path to workbook1"
and than this one to close it Workbooks("workbook1.xlsm").Close SaveChanges:=True
Any ideas why the values are saved when running it separately but not saved when the same code is run one after the other ?
Bookmarks