Range("B7").Select
ActiveCell.FormulaR1C1 = "=[454679845456.xls]Promoforma!R6C5"
This is my current formula in VB where I am trying to create a formula in one file linking to another. In the above, the fomula is extracting info from the 454679845456.xls file into a summary book. Is there a way that I can have the "454679845456.xls" portion of the formula as a variable? Possibly pulling from whatever other file is open at the time as it won't always be called 454679845456.xls.
I hope this makes sense.
At the moment i have a macro set-up where one file is 'saved as' based on a number inputed in one box. in the above, they have have inputted the number 454679845456. the next step i am trying to achieve is to have this number and the data on this new sheet exported to a summary page. at the moment my formula will keep pulling from the 454679845456.xls file as i don't know how to have this as a variable; pulling in the data from the current open book might be an option but if they more than one file open then this may not work.
appreciate any assistance you can give.
Bookmarks