Declare Function GetPrivateProfileString Lib "Kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
Public Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" _
(lpFileOp As SHFILEOPSTRUCT) As Long
Public Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAborted As Boolean
hNameMaps As Long
sProgress As String
End Type
Public Const FO_MOVE = &H1
Public Const FO_COPY = &H2
Public Const FOF_SILENT = &H4
Public Const FOF_RENAMEONCOLLISION = &H8
Public Const FOF_NOCONFIRMATION = &H10
Public Const FOF_SIMPLEPROGRESS = &H100
Public Const FOF_ALLOWUNDO = &H40
Public Const FO_DELETE = &H3
Public Const FO_RENAME = &H4&
Dim FOF_FLAGS As Long
Dim SHFileOp As SHFILEOPSTRUCT
Dim FO_FUNC As Long
Public Declare Function LockWindowUpdate Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal sParam As String) As Long
Public Const LB_FINDSTRINGEXACT = &H1A2
Public safesavename As String
Public ret As String
Public Retlen As String
Public Function SafeSave(Path As String) As String
Dim mPath As String, mTemp As String, mFile As String, mExt As String, m As Integer
On Error Resume Next
mPath = Mid$(Path, 1, InStrRev(Path, "\")) 'Path only
mname = Mid$(Path, InStrRev(Path, "\") + 1) 'File only
mFile = Left(Mid$(mname, 1, InStrRev(mname, ".")), Len(Mid$(mname, 1, InStrRev(mname, "."))) - 1) 'File only - no extension
If mFile = "" Then mFile = mname
mExt = Mid$(InStmna
"tM As String, mle As Se) - "d$(InStmna
"tM As SteH40
Public Const,TeCA As StrinString, mle As Se) - "ed$(In'1Atmna