| | |
can someone plz help me with this?
![]() |
•
•
Join Date: Jun 2003
Posts: 6
Reputation:
Solved Threads: 0
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
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!!!!!!
![]() |
Similar Threads
- I NEED SUPPORT **"IMPORTANT"** PLZ HELP (Windows NT / 2000 / XP)
- Windows media player (Windows NT / 2000 / XP)
- Bridge.dll...Make it go away, Plz (Viruses, Spyware and other Nasties)
- can sum1 look @ dis plz (Viruses, Spyware and other Nasties)
- Hijackthis log file - plz help (Viruses, Spyware and other Nasties)
- IE not working...PLZ help :cry: (Web Browsers)
- PLZ help it's urgent! (Web Browsers)
- plz help ppl...... (Computer Science)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Comments
- Next Thread: how to show item in list box??
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





