Hi!
I need to make a correction to 25 budget files I sent out to our field employees. So I want to send a new file, with a macro button in it, that will run a macro I have written to fix the error in these 25 budget files.
There are 25 field employees, each with their own version of this file, and they may have changed the names on the budget file I sent them.
My question is how can I make the macro i am sending out make the budget file (which will already be open on their computers) the active file, so that my macro fixes the correct file?
So What I'm wondering is if there is a way to make them select the budget file to make it the activeworkbook, as part of the macro i am sending them. This way, I won't need the line Windows("BudgetFile1.xls").Activate because they may have changed the name of the file.
Here is the sub I want to run: (I simplified it for the example)
Sub FixBudgetFiles()
Windows("BudgetFile1.xls").Activate
Sheets("Rollup").Activate
Range("AT737").Select
ActiveCell.FormulaR1C1 = "=R[235]C"
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
Any ideas or help would be very appreciated.
Thanks,
Demo8II
I need to make a correction to 25 budget files I sent out to our field employees. So I want to send a new file, with a macro button in it, that will run a macro I have written to fix the error in these 25 budget files.
There are 25 field employees, each with their own version of this file, and they may have changed the names on the budget file I sent them.
My question is how can I make the macro i am sending out make the budget file (which will already be open on their computers) the active file, so that my macro fixes the correct file?
So What I'm wondering is if there is a way to make them select the budget file to make it the activeworkbook, as part of the macro i am sending them. This way, I won't need the line Windows("BudgetFile1.xls").Activate because they may have changed the name of the file.
Here is the sub I want to run: (I simplified it for the example)
Sub FixBudgetFiles()
Windows("BudgetFile1.xls").Activate
Sheets("Rollup").Activate
Range("AT737").Select
ActiveCell.FormulaR1C1 = "=R[235]C"
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
Any ideas or help would be very appreciated.
Thanks,
Demo8II
Last edited: