Hi all
I would like to know the syntax for referencing a directory path which is stored in another workbook.
I have built a spreadsheet for my own use, but would like to make it available to other users. The intention is for them to populate specific cells with their own information regarding the name & location of a second worksheet. Part of the code references my filepath and need to be able to extract their info for the code to execute properly.
i'm not 100% on how to tag my code... hoping this works!
The data is stored in the following:
Any help much appreciated
Thanks and regards
Mark
I would like to know the syntax for referencing a directory path which is stored in another workbook.
I have built a spreadsheet for my own use, but would like to make it available to other users. The intention is for them to populate specific cells with their own information regarding the name & location of a second worksheet. Part of the code references my filepath and need to be able to extract their info for the code to execute properly.
i'm not 100% on how to tag my code... hoping this works!
Code:
Sub MT02_SaveAs()
Application.DisplayAlerts = False
ChDir "C:\SAP\MATERIAL TRACKING"
ActiveWorkbook.SaveAs Filename:= _
"C:\SAP\MATERIAL TRACKING\Materials Tracking Report " & Format(Now, "dd-mm-yyyy hh.mm.ss") & ".xlsx", FileFormat:= _
xlOpenXMLWorkbook, CreateBackup:=False
Application.DisplayAlerts = True
End Sub
The data is stored in the following:
Code:
Workbooks("Run MT Report.xlsx").Sheets(1).Range ("C6")
Any help much appreciated
Thanks and regards
Mark