943,525 Members | Top Members by Rank

Ad:
Jun 19th, 2003
0

can someone plz help me with this?

Expand Post »
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
Similar Threads
Reputation Points: 11
Solved Threads: 0
Newbie Poster
archangel is offline Offline
6 posts
since Jun 2003
Apr 3rd, 2008
0

Re: can someone plz help me with this?

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sadeghit is offline Offline
3 posts
since Mar 2008
Apr 5th, 2008
0

Re: can someone plz help me with this?

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Comments
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: how to show item in list box??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC