View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Iain Sheetware Iain Sheetware is offline
external usenet poster
 
Posts: 4
Default Excel File format List

Douglas

Try this function:

'returns an array of strings containing descriptions of the possible save as options
Private Function AllSaveAsOptions() As Variant

Dim ret_val() As String
Dim fdfs As FileDialogFilters
Dim this_fdf As Long

'Set the FileDialogFilters collection variable to
'the FileDialogFilters collection of the SaveAs dialog box.
Set fdfs = Application.FileDialog(msoFileDialogSaveAs).Filter s

'make the array big enough
ReDim ret_val(fdfs.Count)

'Iterate through the description and extensions of each
'default filter in the SaveAs dialog box.
For this_fdf = 1 To fdfs.Count
ret_val(this_fdf) = fdfs.Item(this_fdf).Description
Next fdf

'and return the array
AllSaveAsOptions = ret_val
End Function

Hope that helps.

Iain


(Douglas Lund) wrote in message om...
I'm coding export functionality into my VB6 app, which incorporates an
excel file export, for which I use the Microsoft Excel 9.0 object
library. I would like to display the excel file formats available to
the user in a combo box.

How can I get a list of available formats at runtime ?