Sorry a newbie to Excel programming so any help is appreciated.

I need to be able to loop through all the sheets in a workbook and add a formula to a cell which references the sheet previous.

i.e. I need to go to Sheet2 and put a formula in A1 that says
='Sheet1'!A1
And so on through all the remaining sheets. Hope that makes sense.

I have to do this against every file in a particular folder. Is it possible to do all of it through code? If not then I can run code against each file individually.

Thanks in advance.
Jonathan