Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Repost: Smart Hyperlink

We currently operate in a peer-to-peer environment, but
are soon migrating to a file server. Our principal
currently maintains our project schedule in an Excel
worksheet residing on his PC's hard drive. We develop
several cost estimates and revisions thereof for each
project.

Frequently, we review an old estimate, using the schedule
to determine the project number and who prepared the
estimate, and then look in the Shared folder of that user
to retrieve the estimate. In other words, a lot of
productivity-killing navigation. We experimented with
hyperlinks, but since they're linked to a specific file,
they're quickly out-of-date.

So, we'd like to develop a "smart" hyperlink that takes us
to the last revision of the last estimate from the drive
of the estimator, the initials of which is maintained in a
column of the schedule. Our file naming convention is:

<projectnumberE<estimatenumber[R<revisionnumber], e.g.,

04003E1
04003E2R1
04003E2R2

Can anyone assist us?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Repost: Smart Hyperlink

One way you could possibly approach this (though not in hyperlinks) is to have a program file that contains a list consisting all of your core directory names. A VBA program could then be used to retrieve a list of the file names in your various mapped folders into an array. You can do wild card searching to obtain a match based on project number, etc. so that only those files associated with the project are retrieved.

You already have a standard file naming convention which is good. It also looks like your naming convention will sort from newest file to oldest file at the operating system level. This is also good.

Once the program copies your file list into an array, sort the array if necessary, then structure your code to always open the last file in the array. This would always be the most recent file in that subdirectory.

HTH
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Repost: Smart Hyperlink

Here is a function that might give you the idea, copy into a module, fix any line wrapping, change the path to your path and run the sub

Option Private Modul
Option Explici
Option Base

Private Sub Return_File_List(

Dim arrFileList() As Varian
Dim strPath As Strin
Dim strType As Strin
Dim varItem As Varian
Dim strMsg As Strin

strPath = "C:\Test\" '<Modify this pat
strType = "*.xls" '<Modify the file typ

arrFileList = FileList(strPath, strType, False

For Each varItem In arrFileLis
strMsg = strMsg & varItem & vbC
Nex
MsgBox strMs

End Su

Function FileList(argPath As String, argType As String, argSearchSubFolders As Boolean

Dim ofsSearch As FileSearc
Dim ofsFound As FoundFile
Dim lngX As Lon
Dim intSlash As Intege
Dim strFileName As Strin
Dim arrFileList() As Varian

Set ofsSearch = Application.FileSearc

With ofsSearc
.NewSearc
.SearchSubFolders = argSearchSubFolder
.Filename = argTyp
.LookIn = argPat
.Execute msoSortByFileNam
End Wit
Set ofsFound = ofsSearch.FoundFile

For lngX = 1 To ofsFound.Coun
intSlash = InStrRev(ofsFound(lngX), "\", -1
strFileName = Right(ofsFound(lngX), Len(ofsFound(lngX)) - intSlash
ReDim Preserve arrFileList(lngX
arrFileList(lngX) = strFileNam
Next lng
FileList = arrFileLis

End Function
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Had to repost it!!! Prashant Excel Discussion (Misc queries) 1 April 23rd 10 03:19 PM
Repost! Richard Excel Discussion (Misc queries) 1 September 26th 09 01:10 PM
Repost for Ron Jenny B. Excel Discussion (Misc queries) 1 May 21st 08 09:39 AM
make VLINKUP like vlookup; smart hyperlink by data value wizard61 Excel Worksheet Functions 3 May 16th 08 04:13 PM
Repost of Using IF and SUMPRODUCT Joe Gieder Excel Worksheet Functions 8 February 10th 05 07:13 PM


All times are GMT +1. The time now is 08:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"