Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: need help

  1. #1
    New Coder
    Join Date
    Apr 2012
    Posts
    67
    Thanks
    12
    Thanked 1 Time in 1 Post

    Question need help

    Hi guys i am coding in visual basic (i know this is wrong but you know only place where i can find good helpful people) so how do i save multiple combo boxes using this code? because adding a cmma doesn't work
    Code:
     Private Sub SaveToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveToolStripMenuItem.Click
            Dim Save As New SaveFileDialog
            Save.Filter = "Text Files (*.txt)|*.txt|ALL FILES (*.*)|*.*"
            Save.Title = "Save File"
            Save.CheckPathExists = True
            Save.ShowDialog(Me)
            Try
                My.Computer.FileSystem.WriteAllText(Save.FileName, ComboBox1.Text, False)
            Catch ex As Exception
            End Try
        End Sub

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,776
    Thanks
    41
    Thanked 196 Times in 195 Posts
    I am a little unsure what it is you are trying to do- it seems like you are trying to do a file upload or something- but it seems to have gone wrong :|

    the short answer is you need to take each item and cast it as a file and then save it- but I am not sure 'what' it is you are doing or 'how' you are going about doing so.

    I requested this thread be moved to either computer programming or at the least asp.net- when posting VB Q's I don't know 'where' to throw it- since it kinda hits ASP/ASP.NET but it falls more in line to computer programming- I assume that is where it will end up- It will probably get more hit's there as well- feel free to PM me if no responses

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •