954,198 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can someone plz help me with this?

ok im made a visual basic form added a 3 command buttons 1 exits and 2 go to different forms and then i have a text1 and i have a save button at the top its on the mnu but the thing is is when i put the code down theres an error on line 3. heres the code and the error is underlined

Private Sub mnuFileSave_Click()
Dim sFile As String
If Left$(ActiveForm.Caption, 8) = "Document" Then
With dlgCommonDialog
.DialogTitle = "Save"
.CancelError = False
'ToDo: set the flags and attributes of the common dialog control
.Filter = "All Files (*.*)|*.*"
.ShowSave
If Len(.FileName) = 0 Then
Exit Sub
End If
sFile = .FileName
End With
ActiveForm.rtfText.SaveFile sFile
Else
sFile = ActiveForm.Caption
ActiveForm.rtfText.SaveFile sFile
End If

End Sub

and my second question is instead of it saving everything as a rtf, all files, etc. how do i make it so that it will only save it as a .bat files, what should i change about it.

plz some1 help me thanks, archangel

archangel
Newbie Poster
6 posts since Jun 2003
Reputation Points: 11
Solved Threads: 0
 

As you said you have textbox in your form which named "ActiveForm". if I'm right so you have to write ActiveForm.text instead of ActiveForm.caption. caption is used for a lable
sadegh.mss

sadeghit
Newbie Poster
3 posts since Mar 2008
Reputation Points: 10
Solved Threads: 0
 

Hi,

ActiveForm refers to Active Child Form of the MDI Form. In your project make both the form's as Child of the mdi form, by seting MDIChild=True

Regards
Veena

QVeen72
Posting Shark
950 posts since Nov 2006
Reputation Points: 84
Solved Threads: 143
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You