Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I store my users preferences?

Posted on 2003-03-30
4
Medium Priority
?
158 Views
Last Modified: 2010-05-01
I have a form with a few drop down list boxes and am wondering how I would store which options my user picks so that my program will load with those preferences next time. So say my user chooses a red colour scheme from a drop down list, how do I make it so my program will load with the red colour scheme the next time it is opened?
thanks
0
Comment
Question by:MikeDill
  • 2
  • 2
4 Comments
 
LVL 48

Expert Comment

by:AlexFM
ID: 8233422
0
 

Author Comment

by:MikeDill
ID: 8233578
Sorry Im a complete newbie at this, I sort of understand the statments you directed me to but Im not sure how to work them into something i can use.
Please could you give me an example?
Say if I wanted to store the user name "bob" from a text box called "txtusername" in a project called "myproject"

How would I save it and load it again?

thank you for your help
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 225 total points
ID: 8233604
Private Sub Form_Load()
    txtusername.Text = GetSetting(App.Title, "Preferences", "UserName", "")
End Sub



Private Sub Form_Unload(Cancel As Integer)
   SaveSetting App.Title, "Preferences", "UserName", txtusername.Text
End Sub

0
 

Author Comment

by:MikeDill
ID: 8233632
Sweet thanks, I think I can work off what you have given me
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question