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
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