Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


why doesn't my savefile option work?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-15-2007, 08:41 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
Default why doesn't my savefile option work?

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
Reply With Quote
  #2 (permalink)  
Old 06-15-2007, 09:14 PM
Junior Member
 
Join Date: May 2007
Posts: 46
Default

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
Reply With Quote
  #3 (permalink)  
Old 06-15-2007, 09:15 PM
Basic4ppc Veteran
 
Join Date: Apr 2007
Posts: 200
Default

thnx, works great now!
Marc
Reply With Quote
Reply



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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
calender control option show/open ? mike2ppc Questions & Help Needed 10 10-27-2008 08:54 PM
FAX Option? Jonathon Basic4ppc Wishlist 3 06-25-2008 07:52 AM
Option Explicit badkarma Questions & Help Needed 6 06-21-2008 05:08 PM
SMS Message Intercept option To Delete Message RandomCoder Basic4ppc Wishlist 0 03-02-2008 10:11 PM
SetPixel do no work Put Claude Questions & Help Needed 1 05-14-2007 06:21 AM


All times are GMT. The time now is 12:44 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0