Good day to you all out there. Please, can someone advice me how i can link up to a file in window explorer from an excel sheet with only a click on a particular cell.
pls explain "link"
If you just want to open the file, just use Insert>Hyperlink - no code needed. anything else will need to be explained further
ps - it is always appreciated if someone has made a stab at creating their own code BEFORE asking for help here - saying
"some written code will be very helpful", whether you mean it to or not, suggests to me that you have been asked to do something and before even trying it, you are asking for a complete (free) solution Rgds
Geoff
Vah! Denuone Latine loquebar? Me ineptum. Interdum modo elabitur
**** The program below is what i wrote for different functions on the excel sheet. But in this case i wanted to know what i should do to enable me call a related file that is saved in window explorer from the excel sheet by clicking on aspecific cell on this sheet****
Private currRow As Integer
Private currCol As Integer
Private oldValue As Variant
Private inWorkSheetChange As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
Dim newValue As Variant
Dim colLastUpdate As Integer
If currCol = ActiveSheet.[LASTUPDATE].Column Then
inWorkSheetChange = False
Exit Sub
End If
If inWorkSheetChange Then
inWorkSheetChange = False
Exit Sub
End If
inWorkSheetChange = True
colLastUpdate = ActiveSheet.[LASTUPDATE].Column
ActiveSheet.Cells(currRow, colLastUpdate).Value = Date
inWorkSheetChange = True
If currRow > (ActiveSheet.[lastRow].Row - 2) Then
inWorkSheetChange = False
Exit Sub
End If
You can insert a hyperlink to explorer.exe but I cannot make it open the correct folder. You can usually add extensions onto executable file paths to do things like that, but I cannot make it work with explorer.
Sorry I can't be any more help.
Tom
ps. If you did this with code, then you would probably end up having to use the very "hit and miss" SendKeys function to force explorer to "browse" to the correct folder.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.