Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > File I/O and Registry > how to save to a file - a then some...


Reply
 
Thread Tools Display Modes
  #1  
Old 06-24-2003, 04:41 AM
MeLcY MeLcY is offline
Newcomer
 
Join Date: Jun 2003
Posts: 16
Default how to save to a file - a then some...


Hey there pplz!!

JUst a question...i would appreciate it if someone could tell me what to do if i wanna save to a file. In my program, you enter in a name into a text box, and when you click on a command button, the name is saved into a file and also displayed on the next form ie "Welcome 'name' ".

Since my program is a quiz program, at the conclusion of all the questions, a final "total" is displayed along with a "result" (which is a description of a personality type). I would like my prgram to 'save' this information, along withthe name of the user into a file, adn this information is then retrieved and placed on a scoreboard. if there were any recent results of other users...there results are also place on the scoreboard...sort ofaccumulated if you know what i mean.

If anyone can offer even the smallest bit of code that might work..i would GREATLY appreciated. i kinda have no idea how to code this..hence i am officially screwed.

Cheer in advance to those who may be able to help. Keep smiling everyone *smiles gratefully*
Reply With Quote
  #2  
Old 06-24-2003, 04:59 AM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default

You can use the file functions for this (open, print, input etc), but you might consider using the registry functions instead.
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #3  
Old 06-24-2003, 05:06 AM
MeLcY MeLcY is offline
Newcomer
 
Join Date: Jun 2003
Posts: 16
Default

Hey, thanx BillSoo for replying, but im only a beginner with VB so if you could simplify that down for me a bit...would be great. Thanks
Reply With Quote
  #4  
Old 06-24-2003, 10:56 PM
geek's Avatar
geek geek is offline
Regular
 
Join Date: Sep 2002
Posts: 78
Default

have you declared the name in a module...

Public username As String... change username to whatever your variable is named

and then

in your form as normal

Private Sub Form_Load()
lblWelcome.caption = lblWelcome.caption & username
End Sub



That should work
Reply With Quote
  #5  
Old 06-24-2003, 11:07 PM
MeLcY MeLcY is offline
Newcomer
 
Join Date: Jun 2003
Posts: 16
Default

Thankies Geek. it worked *smiles happily*
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 07:09 PM
File Problems: Files Not Closing etc. Templeton Peck General 5 03-29-2003 11:34 PM
Doesn't want to register! MikeyM Installation / Documentation 5 03-02-2003 08:22 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->