Hi, I have this snippet of code from
This is just the snippet that i have used: Function TestIt()
Dim strFilter As String
Dim lngFlags As Long
strFilter = ahtAddFilterItem(strFilter, "Access Files (*.mda, *.mdb)", _
"*.MDA;*.MDB")
strFilter = ahtAddFilterItem(strFilter, "dBASE Files (*.dbf)", "*.DBF")
strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.TXT")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
MsgBox "You selected: " & ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _
DialogTitle:="Hello! Open Me!")
' Since you passed in a variable for lngFlags,
' the function places the output flags value in the variable.
Debug.Print Hex(lngFlags)
End Function
that allows me to open a file dialogue box to select a file, on the form i also have a text field, that i would like to get the path for the selected file.
I have the code on call testit() on the click event, which seems to be working fine, what i cannot work out is how to pass that value the path to the text field, which is a hyperlink. I think lngFlags has the value that i need, not sure though.
Any help most appreciated..
Many Thanks
Yurov Ardyy
This is just the snippet that i have used: Function TestIt()
Dim strFilter As String
Dim lngFlags As Long
strFilter = ahtAddFilterItem(strFilter, "Access Files (*.mda, *.mdb)", _
"*.MDA;*.MDB")
strFilter = ahtAddFilterItem(strFilter, "dBASE Files (*.dbf)", "*.DBF")
strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.TXT")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
MsgBox "You selected: " & ahtCommonFileOpenSave(InitialDir:="C:\", _
Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, _
DialogTitle:="Hello! Open Me!")
' Since you passed in a variable for lngFlags,
' the function places the output flags value in the variable.
Debug.Print Hex(lngFlags)
End Function
that allows me to open a file dialogue box to select a file, on the form i also have a text field, that i would like to get the path for the selected file.
I have the code on call testit() on the click event, which seems to be working fine, what i cannot work out is how to pass that value the path to the text field, which is a hyperlink. I think lngFlags has the value that i need, not sure though.
Any help most appreciated..
Many Thanks
Yurov Ardyy