User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 392,077 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,044 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser:
Views: 2675 | Replies: 2
Reply
Join Date: Jun 2003
Posts: 6
Reputation: archangel is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
archangel archangel is offline Offline
Newbie Poster

can someone plz help me with this?

  #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!!!!!!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 3
Reputation: sadeghit is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sadeghit sadeghit is offline Offline
Newbie Poster

Re: can someone plz help me with this?

  #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  
Join Date: Nov 2006
Posts: 695
Reputation: QVeen72 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 95
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Master Poster

Re: can someone plz help me with this?

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 12:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC