why doesn't my savefile option work?

Discussion in 'Questions (Windows Mobile)' started by Stellaferox, Jun 15, 2007.

  1. Stellaferox

    Stellaferox Active Member Licensed User

    Hi guys,

    I have the following lines in code with y textbox.text full of data. When trying to save this I get an access denied error. Any idea?

    Sub mnuFileSave_Click
    Savedialog.Filter = "Text files (*.txt)|*.txt"
    if fName = "" then
    Choice = savedialog.Show
    if Choice = cCancel then return
    else
    fName = Savedialog.File end if
    fileopen (F,fName,cWrite) s = txtbxData.Text
    filewrite (F,s)
    fileclose (F)
    End Sub
     
  2. petrbury

    petrbury Member Licensed User

    Hi, try this :

    Savedialog.Filter = "Text files (*.txt)|*.txt"
    if fName = "" then
    savedialog.Show
    fname = savedialog.file
    if fname = cCancel then return
    end if
    fileopen (F,fName,cWrite)
    s = txtbxData.Text
    filewrite (F,s)
    fileclose (F)
    End Sub

    It should work.

    Petr
     
  3. Stellaferox

    Stellaferox Active Member Licensed User

    thnx, works great now!
    Marc
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice