Thanks for help in advance.
I have a piece of code that saves a new version of a file and updates links in the file. The macro bases the name of the file, the links and the directory it is saved in on a cell value on a sheet called Macro. Basically I have a formula that works out what the directory needs to be based on a name I choose in cell J3. The list of companies is in cells A2:A27. At the moment I open the file, choose the target company and then run the macro and do this 26 times. What I would like is to press go, and then for it to take the first company name in the list (A2), copy it, paste it into cell J3, calculate the sheet, run the macro to save a new file, then take the second company name (A3) paste it into cell J3, save as and update etc and repeat the process all the way to the end of the list. In the code below I would only need it to show the message box once at the end not each time. The first If statement below is just checking that I am not telling it to update links to the company it already is looking at in the directory (H8 works out the current company, J8 works out the new company based on the company name I put into J3)
I think this is probably quite easy but not sure how to set up the loop.