can someone plz help me with this?

Reply

Join Date: Jun 2003
Posts: 6
Reputation: archangel is an unknown quantity at this point 
Solved Threads: 0
archangel archangel is offline Offline
Newbie Poster

can someone plz help me with this?

 
0
  #1
Jun 19th, 2003
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
I MUST LEARN MORE!!!!!!
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 3
Reputation: sadeghit is an unknown quantity at this point 
Solved Threads: 0
sadeghit sadeghit is offline Offline
Newbie Poster

Re: can someone plz help me with this?

 
0
  #2
Apr 3rd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: can someone plz help me with this?

 
0
  #3
Apr 5th, 2008
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC