Click here to Skip to main content
15,922,145 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionbubbling events up.....is there a better approach? Pin
MartinOrtiz31-Jul-03 10:06
MartinOrtiz31-Jul-03 10:06 
GeneralWindows Form Datagrid Pin
Milancie31-Jul-03 9:58
Milancie31-Jul-03 9:58 
GeneralRe: Windows Form Datagrid Pin
Peet Schultz4-Aug-03 22:59
Peet Schultz4-Aug-03 22:59 
GeneralShowing a form inside a control Pin
THEMYTH31-Jul-03 3:31
THEMYTH31-Jul-03 3:31 
GeneralPlug-in for MS Outlook. please help Pin
Atif Bashir30-Jul-03 17:20
Atif Bashir30-Jul-03 17:20 
GeneralExecution from server Pin
JimWDurbin30-Jul-03 12:06
JimWDurbin30-Jul-03 12:06 
GeneralRe: Execution from server Pin
Wayne Phipps31-Jul-03 4:31
Wayne Phipps31-Jul-03 4:31 
QuestionHow do I save to file? Pin
MrGee30-Jul-03 4:32
MrGee30-Jul-03 4:32 
I have a project that has a RichTextBox that a user can enter data. The text box is called txtOut. I have a CommonDialog control and a command control called cmdSave with this code attached:

Private Sub cmdSave_Click()

Dim sFileName As String

sFileName = txtOut.Text '& theExtension

' Set CancelError is True
CommonDialog1.CancelError = True
On Error GoTo ErrHandler
' Set flags
CommonDialog1.Flags = cdlOFNHideReadOnly
' Set filters
CommonDialog1.Filter = "All Files (*.*)|*.*|Hex Files" & _
"(*.hex)|*.hex|Assembly Files (*.asm)|*.asm"
' Specify default filter
CommonDialog1.FilterIndex = 2
' Display the Open dialog box
CommonDialog1.ShowSave
' Display name of selected file
MsgBox CommonDialog1.FileName


Exit Sub

ErrHandler:
'User pressed the Cancel button
Exit Sub

End Sub

Everything works fine except after I name the file to be saved and hit the save button in the dialog window, it doesn't create the save file. I'm guessing it doesn't see the data in the text box. Can someone give me some help please? Thanks!Smile | :)


AnswerRe: How do I save to file? Pin
Martin Cross30-Jul-03 4:44
Martin Cross30-Jul-03 4:44 
GeneralRe: How do I save to file? Pin
MrGee30-Jul-03 5:54
MrGee30-Jul-03 5:54 
GeneralRe: How do I save to file? Pin
Martin Cross30-Jul-03 6:02
Martin Cross30-Jul-03 6:02 
GeneralRe: How do I save to file? Pin
phlipping31-Jul-03 23:30
phlipping31-Jul-03 23:30 
GeneralRe: How do I save to file? Pin
MrGee1-Aug-03 8:04
MrGee1-Aug-03 8:04 
QuestionImplementing Pointers in VB.NET? Pin
Martin Cross29-Jul-03 23:59
Martin Cross29-Jul-03 23:59 
AnswerRe: Implementing Pointers in VB.NET? Pin
Mike Dimmick30-Jul-03 5:13
Mike Dimmick30-Jul-03 5:13 
GeneralRe: Implementing Pointers in VB.NET? Pin
Martin Cross30-Jul-03 5:29
Martin Cross30-Jul-03 5:29 
GeneralSpeech recognition Pin
S.Seetharaman29-Jul-03 22:32
S.Seetharaman29-Jul-03 22:32 
GeneralRe: Speech recognition Pin
Anonymous30-Jul-03 12:02
Anonymous30-Jul-03 12:02 
GeneralC# -> VB.NET port request Pin
Joey Lott29-Jul-03 9:59
sussJoey Lott29-Jul-03 9:59 
GeneralRe: C# -> VB.NET port request Pin
Bo Hunter29-Jul-03 10:39
Bo Hunter29-Jul-03 10:39 
GeneralRe: C# -> VB.NET port request Pin
wadester3-Aug-03 15:14
wadester3-Aug-03 15:14 
QuestionHow to import Data from MPP Pin
Samya28-Jul-03 22:47
Samya28-Jul-03 22:47 
AnswerRe: How to import Data from MPP Pin
Anonymous31-Jul-03 21:09
Anonymous31-Jul-03 21:09 
GeneralShowing Form Pin
THEMYTH28-Jul-03 21:55
THEMYTH28-Jul-03 21:55 
GeneralRe: Showing Form Pin
Nic Rowan28-Jul-03 23:47
Nic Rowan28-Jul-03 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.