Good work, however
the SelectFile function declaration should be:
Public Function SelectFile(ByVal hWndOwner As Long, Optional ByVal Filter As String = "All Files (*.*)|*.*", Optional ByVal DefaultExtension As String = "", Optional ByVal FileMode As CDFileModes = cdfmOpenFile, Optional ByVal DialogCaption As String = "", Optional ByVal DefaultFilename As String = "", Optional ByVal DefaultPath As String = "", Optional FilterIDX As Long = 0, Optional MoreFlags As CDFileFlags) As String
Dim R As Long, SP As Long, ShortSize As Long, Z As Long
ie. the default values for the passed strings were in the wrong place,
Optional ByVal Filter = "All Files (*.*)|*.*" As String, ...is wrong, should be:
Optional ByVal Filter As String = "All Files (*.*)|*.*", ...