CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Posts
    67

    Use dialogue box to decide which format to save to

    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?


  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Use dialogue box to decide which format to save to

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured