Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() i have this code, and I want it to search for the latest folder that has its root folder as part of its name. (example) in the folder project_test (root folder) there are the folders project_test0001, project_test0002, project_test0003, project_test0004, folder1, and folder2. I want the latest folder that it counts is project_test0004. (I do not have any folders named project_test - project_test0004 or folder1 and 2 that was just for an example I'll use this in many folders.) Also this is only part of the code the rest of the code is ok. Function lastest_folder(p As Variant, ar2 As Variant) Dim t1 As Variant t = Dir(p & ar2 & "*.*", vbDirectory) While t < "" If (t < "") Then t1 = t End If t = Dir() Wend If t1 = "" Then t1 = t End If lastest_folder = t1 End Function -- tim64 ------------------------------------------------------------------------ tim64's Profile: http://www.excelforum.com/member.php...o&userid=23295 View this thread: http://www.excelforum.com/showthread...hreadid=383248 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Links Between Folders | Excel Worksheet Functions | |||
Passwords for folders? | Excel Discussion (Misc queries) | |||
moving folders | Excel Programming | |||
Get folders list | Excel Programming | |||
Counting the Number of Folders Not Files. | Excel Programming |