Click to See Complete Forum and Search --> : Use dialogue box to decide which format to save to


WeeBeng
March 16th, 2001, 02:19 AM
I have written code to save some data into either excel or text format. I wish to be able to know which format has been selected so as to decide which function to call. How would i be able to do this using a common dialogue box?

John G Duffy
March 16th, 2001, 08:07 AM
The CommonDialog1.FilterIndex property will give you the value that the user selected from the List of Filters you supplied.

private Sub Form_Load()
CommonDialog1.Filter = ("Text|*.txt|BMP|*.bmp")
CommonDialog1.ShowSave
Debug.print CommonDialog1.FilterIndex
End Sub




John G