Save listitems to the register

Posted on 1999-12-27
Medium Priority
Last Modified: 2010-05-02

I have a ListView containing 10 items; I want these items to be saved in the register. And if to two (or more items) accidentally has the same name the items should be saved as the same key.

(I use VB6)

Question by:ChristianJ
  • 4
LVL 14

Expert Comment

ID: 2308686
VB has a built-in way of getting and saving information using the Registry.

The methods are GetSetting, GetAllSettings, and SaveSetting.

formats are:

   GetSetting(appname, section, key[, default])

   GetAllSettings(appname, section)

   SaveSetting appname, section, key, setting

Hope this helps!


LVL 14

Expert Comment

ID: 2308687
By the way, there are examples of these methods in the VB Help Pages...


Author Comment

ID: 2313657
I am already aware of the GetSetting, GetAllSettings, and SaveSetting methods. I am not sure if you understood what I wanted. I try to explain again:

I have a ListView with 10 items. When pressing a button all these items should be saved into the registry. When using what you suggested just one item was saved into the registry. What I want is the items to appear like this and if two items accidentally has the same name just one of them should be saved.  

FavPath1            "Listitem1"
FavPath2            "Listitem2"
FavPath3            "Listitem3"
FavPath4            "Listitem4"
FavPath5            "Listitem5"
FavPath6            "Listitem6"
LVL 14

Accepted Solution

mcrider earned 140 total points
ID: 2313800
You need to do a SaveSetting for each item... Not just one.

LVL 14

Expert Comment

ID: 2318288
Thanks for the points! Glad I could help!


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses

586 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