Asks for Excel file to open, then return the full filename with path if selected, returns "" if not.
' Allows all Excel file types : XLS*
Initial Dir can be defined as Folder3 to let tool open to that folder first
BrowseWorkbook_Save needs GetExtension
Function BrowseWorkbook(Optional Folder3="")
BrowseWorkbook = ""
If IsThere1(Folder3) Then ChDir Folder3
FiNa = Application.GetOpenFilename("All Excel Files,*.xls*")
If FiNa = "False" Then Exit Function
BrowseWorkbook = FiNa
End Function
Function BrowseWorkbook_Save()
ChDir ThisWorkbook.Path
OrFi = GetSon(SettingRead("Source_File"))
BrowseWorkbook_Save = ""
Thi = Application.GetSaveAsFilename(OrFi, "CSV Files (*.csv),*.csv,Text files (*.txt),*.txt")
If Thi = "False" Then Exit Function
DoEvents
If GetExtension(Thi) = "." Then Thi = Thi & "txt"
BrowseWorkbook_Save = Thi
DoEvents
End Function
BrowseWorkbook = ""
If IsThere1(Folder3) Then ChDir Folder3
FiNa = Application.GetOpenFilename("All Excel Files,*.xls*")
If FiNa = "False" Then Exit Function
BrowseWorkbook = FiNa
End Function
Function BrowseWorkbook_Save()
ChDir ThisWorkbook.Path
OrFi = GetSon(SettingRead("Source_File"))
BrowseWorkbook_Save = ""
Thi = Application.GetSaveAsFilename(OrFi, "CSV Files (*.csv),*.csv,Text files (*.txt),*.txt")
If Thi = "False" Then Exit Function
DoEvents
If GetExtension(Thi) = "." Then Thi = Thi & "txt"
BrowseWorkbook_Save = Thi
DoEvents
End Function
Views 3,127
Downloads 1,205
CodeID
DB ID