Sometime it can be useful to save files with custom file extensions, such as "MyWork.mie". This allows us to filter these files out when we used the OpenFile dialog for example. It also means that we can associate that file extension with a front loader, if we are using one.
It’s very simple to save out a file with a custom extension, you just have to specify it during the save operation. I tend to stick with text formats but it is possible to use .xls file formats with custom extensions. For example
Const FILE_EXTENSION As String = ".MIE"
Dim sFileString As String
sFileString = "*" & FILE_EXTENSION
sFileString = "M.I.E data file (" & sFileString & "), " & sFileString
sFileString = Application.GetSaveAsFilename("", FileFilter:=sFileString) 'This gets the full path!
Workbooks.Add
ActiveWorkbook.SaveAs FileName:=sFileString ',FileFormat:=xlCSV ‘ xlTextMSDOS ‘ some other file formats
End Function
Note that the underlining file type does not change.