Getox Posted October 8, 2004 Posted October 8, 2004 i cant get this working at all all it does is say it has illegal letters SaveFileDialog.Title = ("Save File") SaveFileDialog.Filter = ("HTML (*.html*)|*.html*|HTM (*.htm*)|*.htm*|XHTML (*.xhtml*)|*.xhtml*|XML (*.xml*)|*.xml*|PHP (*.php*)|*.php*|PHP3 (*.php3*)|*.php3*|PHP4 (*.php4*)|*.php4*|PHTML (*.phtml*)|*.phtml*|ASP (*.asp*)|*.asp*|ASPX (*.aspx*)|*.aspx*") Me.SaveFileDialog.ShowDialog() Dim oFile As System.IO.File Dim oWrite As System.IO.StreamWriter oWrite = oFile.CreateText(SaveFileDialog.FileName & "." & SaveFileDialog.Filter) oWrite.WriteLine(TextBox.Text) oWrite.Close() Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Getox Posted October 8, 2004 Author Posted October 8, 2004 Is no one able to help me out with this ? Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Getox Posted October 9, 2004 Author Posted October 9, 2004 anyone!!!!!!!!!!!!!!!!!!!!!! Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
*Experts* DiverDan Posted October 9, 2004 *Experts* Posted October 9, 2004 Without getting into editting, here's an example of a SaveFile method. With SaveFileDialog1 .InitialDirectory = 'some directory .Filter = "Volts worksheet (*.elc)|*.elc|Binary (*.bin)|*.bin" .DefaultExt = "elc" .Title = "Save File As" .FileName = 'your file name End With If SaveFileDialog1.ShowDialog() = DialogResult.Cancel Then 'blah Else SaveListView(SaveFileDialog1.FileName) worksheetName = FilenameOnly(SaveFileDialog1.FileName) Add_2OpenedFiles(SaveFileDialog1.FileName) worksheetModified = False End If Hope that gives you some ideas. Dan Quote Member, in good standing, of the elite fraternity of mentally challenged programmers. Dolphins Software
Getox Posted October 9, 2004 Author Posted October 9, 2004 all i want is someone to tell me how to get the app to save it as "File.Extenstion" and not "File" Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Administrators PlausiblyDamp Posted October 9, 2004 Administrators Posted October 9, 2004 If you made your original question clearer then you may have got the answer you were after, saying that DiverDan's suggestion of just using the Dialog's .FileName property should also include the extension. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Getox Posted October 9, 2004 Author Posted October 9, 2004 but im using more than 1 extension and if i set the DefaultExt it only saves it as that EG SaveFileDialog.FileName = ("MyDoc1") SaveFileDialog.DefaultExt = "html" saves it as: MyDoc1.html and if i select the ASP one it saves it as MyDoc1.html Quote Page Edit 2.0 Alpha 2 OUT NOW! - Download Now -
Administrators PlausiblyDamp Posted October 9, 2004 Administrators Posted October 9, 2004 The filter is only used to restrict the files displayed in the dialog box - not to alter the final name entered by the user. The DefaultExt property is only applied to the file name if the user provides a filename without specifying an extension as documented in MSDN. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
vcvc Posted October 10, 2004 Posted October 10, 2004 You have : "HTML (*.html*)|*.html*" Remove the trailing * to give you HTML (*.html)|*.html| Do the same with all the other extensions. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.