Results 1 to 5 of 5

Thread: RichTextBox can't save file

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    Philippines
    Posts
    85

    RichTextBox can't save file

    Hi to all,

    I'm having an error when trying to save the contents of richtextbox. But putting it a message box it works.
    Error is: Unsupported file format .......

    RichTextBox1.SaveFile(Application.StartupPath & "\" & Format(Date.Now.ToString("mmddyy hh:mm") & ".DAT"))

    Can someone help me on this?
    Thank you very much.

  2. #2
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: RichTextBox can't save file

    Maybe you need to specify the file format like this
    VB Code:
    1. RichTextBox1.SaveFile(Application.StartupPath & "\" & Format(Date.Now.ToString("mmddyy hh:mm") & ".DAT"),RichTextBoxStreamType.PlainText)

    Regards
    Jorge
    "The dark side clouds everything. Impossible to see the future is."

  3. #3
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: RichTextBox can't save file

    I see "hh:mm", a windows filename cannot have the ":" character in it.....

  4. #4
    Frenzied Member Asgorath's Avatar
    Join Date
    Sep 2004
    Location
    Saturn
    Posts
    2,036

    Re: RichTextBox can't save file

    gigemboy is abolutely right how did i miss that well its monday...
    "The dark side clouds everything. Impossible to see the future is."

  5. #5
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: RichTextBox can't save file

    lol it happens, Asgorath "Someone's got a case of the Mondays" (from Office Space)

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