Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I currently have an iLogic that searches for an Excel file and pulls information from it to place in custom properties. This iLogic was created when we used a seperate .ipj file for every project so it would search for that specific .ipj and find the associated Excel file. Now we have one .ipj for multiple projects and the excel file is in each project folder (basically we have main project folders in the same directory as the overall .ipj file). I am trying to change the search part of this iLogic to search the current folder and keep searching in subsequent parent folders until the excel file is found.
Dim IPJ As String
Dim IPJ_Name As String
Dim IPJ_Path As String
Dim FNamePos As Long
'set a reference to the FileLocations object.
IPJ = ThisApplication.FileLocations.FileLocationsFile
'get the location of the last backslash seperator
FNamePos = InStrRev(IPJ, "\", -1)
'get the project file name with the file extension
IPJ_Name = Right(IPJ, Len(IPJ) - FNamePos)
'get the project name (without extension)
IPJ_ShortName = Left(IPJ_Name, Len(IPJ_Name) - 4)
iProperties.Value("Project", "Project") = IPJ_ShortName
iProperties.Value("Custom", "PROJECT NUMBER") = GoExcel.CellValue("Project Information.xlsx", "Sheet1", "C8")
Solved! Go to Solution.