Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OP said: Microsoft Excel 9.0 object
Which is Excel 2000. I believe Iain's solution would only work in xl2002 and later. -- Regards, Tom Ogilvy Iain Sheetware wrote in message om... 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 ? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, Thanks Tom.
Is there any way to do it using Excel 2000 object ? If not, am I able to redistribute the Excel 2002 object to clients without Excel 2002? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number Format on Excel File saved from .html file | Excel Discussion (Misc queries) | |||
Convert Excel XLS file to Quickbooks QIF file format | Excel Discussion (Misc queries) | |||
cannot open excel file - says invalid file format - what to do? | Excel Discussion (Misc queries) | |||
Convertion of Excel sheet file to .txt file format | Excel Discussion (Misc queries) | |||
How do I autosave a unique Excel file in the file format 03F67000 | Setting up and Configuration of Excel |