How do I store my users preferences?

Posted on 2003-03-30
Medium Priority
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?
Question by:MikeDill
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 48

Expert Comment

ID: 8233422

Author Comment

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
LVL 48

Accepted Solution

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


Author Comment

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

765 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