Hi,
I am fairly new to VBA and working with older code created by someone that no longer works with my company. The command click no longer does anything and I am not sure why. I did enable variable declaration, but not sure it helps if its existing code. Added the code below, please help.
I am fairly new to VBA and working with older code created by someone that no longer works with my company. The command click no longer does anything and I am not sure why. I did enable variable declaration, but not sure it helps if its existing code. Added the code below, please help.
Code:
Private Sub Command53_Click()
DoCmd.SetWarnings False
Dim strFilter As String
Dim strInputFileName As String
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.xlsx,*.xls)", "*.xlsx;*.xls")
strFilter = ahtAddFilterItem(strFilter, "PDF Files (*.pdf)", "*.pdf")
strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt,*.csv)", "*.txt,*.csv")
strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:="Please Select A File", _
Flags:=ahtOFN_HIDEREADONLY)
If Len(strInputFileName) > 0 Then
' Do something with the selected file
Text51.Value = strInputFileName
Else
End If
End Sub