Forum Discussion

TheChameleon's avatar
TheChameleon
Copper Contributor
Mar 31, 2025

Pushing Updates to Multiple Excel Files That have The same Layout

I am the owner of  file used by Mutiple locations throughout the US that all have the same exact same layout but have different data connections to each of the individual locations. When an update is requested, it becomes a very cumbersome task to update all of the files. I hoping someone has dealt with a similar situation before and was hoping there is a way to "publish" updates and then push them to all of the workbooks. Maybe make a change to a master copy and run a script to update the rest. 

Thank you all in advance!

  • VBA may help:

     

    Sub UpdateFiles()
        Dim MyDir As String, NextFile As String
        MyDir = "C:\Path\To\Your\Files\" ' Update with your directory path
        NextFile = Dir(MyDir & "*.xlsx")
        While NextFile <> ""
            Workbooks.Open (MyDir & NextFile)
            ' Apply your updates here
            Workbooks(NextFile).Save
            Workbooks(NextFile).Close
            NextFile = Dir()
        Wend
    End Sub

     

Resources