• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Open & Update files

Howard101

New Member
I have several workworks for Parts Sales for eg BR1 Parts Sales for Service Sales for eg Br1 Service Sales in C:/Parts & SVC Sales

Once the files are opened I click on the macro Auto_Update for eg Br1 Parts Sales and then select directory C:/extract and select a csv file starting with the same name and containing “Salesperson” in the name of the csv file

I then select another workbook for eg Br1 Service sales.xlsm and then select directory C:/extract and select a csv file starting with the same name and containing “Service order repair register” in the name of the csv file

I would like to automate the process fully i.e files to be opened and macro run which updates the appropriate files as mentioned above

I use the macro below to open up file by file

Code:
Sub Update_Workbooks()
  ChDir ("C:\Parts & SVC Sales")
  Application.DisplayAlerts = False
  fPath = Application.GetOpenFilename
  fName = Mid(fPath, Len("C:\Parts & SVC Sales") + 2)
  Workbooks.Open (fPath)
  Application.Run "'" & fName & "'!Auto_Update"
  ActiveWorkbook.Save
  ActiveWorkbook.Close
  CloseCSV
End Sub [code]
 
I have attached some sample workbooks


 Your assistance in resolving this is most appreciated
 

Attachments

  • Dropbox.zip
    40 KB · Views: 3
Back
Top