H
H. Martins
Hi,
I'm implementing this method so that people can access files and open
them according to folder location previously stored in a configuration
table.
====================================
Private Sub btnPautas_Click()
On Error GoTo btnPautas_Click_Error
Dim strFolder As String
strFolder = "\\server-1\exam\calcs\2009" 'as example
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave(InitialDir:=strFolder, _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Application.FollowHyperlink strInputFileName
On Error GoTo 0
Exit Sub
btnPautas_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure btnPautas_Click of VBA Document Form_TurmasConstituicaoDe"
End Sub
==========================
It works OK but I have a problem: people can 'travel' above the '2009'
folder and from them to other child folders.
Is there a way to say 'clip' the access to parent folders? If not, Is
there some other method to get the required result?
Thanks
H. Martins
I'm implementing this method so that people can access files and open
them according to folder location previously stored in a configuration
table.
====================================
Private Sub btnPautas_Click()
On Error GoTo btnPautas_Click_Error
Dim strFolder As String
strFolder = "\\server-1\exam\calcs\2009" 'as example
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave(InitialDir:=strFolder, _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Application.FollowHyperlink strInputFileName
On Error GoTo 0
Exit Sub
btnPautas_Click_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") in
procedure btnPautas_Click of VBA Document Form_TurmasConstituicaoDe"
End Sub
==========================
It works OK but I have a problem: people can 'travel' above the '2009'
folder and from them to other child folders.
Is there a way to say 'clip' the access to parent folders? If not, Is
there some other method to get the required result?
Thanks
H. Martins