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.
Re: RichTextBox can't save file
Maybe you need to specify the file format like this
VB Code:
RichTextBox1.SaveFile(Application.StartupPath & "\" & Format(Date.Now.ToString("mmddyy hh:mm") & ".DAT"),RichTextBoxStreamType.PlainText)
Regards
Jorge
Re: RichTextBox can't save file
I see "hh:mm", a windows filename cannot have the ":" character in it.....
Re: RichTextBox can't save file
gigemboy is abolutely right how did i miss that well its monday...
Re: RichTextBox can't save file
lol it happens, Asgorath :) "Someone's got a case of the Mondays" (from Office Space)