Hi,
I'm looking to get users to enter or change a file path in either a pop up or cell on a summary sheet, which will then change or update the path in the code, currently hard coded as per piece of code example below. The file path determines where required spreadsheets for that specific user is located, which will be used when the full macro is run. I don't want users to change the path directly in Developer.
Any ideas or help will be greatly appreciated.
I'm looking to get users to enter or change a file path in either a pop up or cell on a summary sheet, which will then change or update the path in the code, currently hard coded as per piece of code example below. The file path determines where required spreadsheets for that specific user is located, which will be used when the full macro is run. I don't want users to change the path directly in Developer.
Any ideas or help will be greatly appreciated.
VBA Code:
On Error Resume Next
xStrPath = "C:\Users\Joe.Bloggs\Desktop\Daily Tag Board Reports\New Tap Events Report\"
xStrFName = Dir(xStrPath & "*.xlsx")
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set xTWB = ThisWorkbook
Do While Len(xStrFName) > 0
Workbooks.Open Filename:=xStrPath & xStrFName, ReadOnly:=True
xStrAWBName = ActiveWorkbook.Name
For Each xWs In ActiveWorkbook.Sheets
xWs.Copy After:=xTWB.Sheets(xTWB.Sheets.Count)
Set xMWS = xTWB.Sheets(xTWB.Sheets.Count)
xMWS.Name = xStrAWBName & "(" & xMWS.Name & ")"
Next xWs
Workbooks(xStrAWBName).Close
xStrFName = Dir()