Saving user form settings

S

Stu W

I've written an application in VBA using Excel. The application features a
form that the user uses to set various application configuration parameters.
I'm currently saving these user parameters in a sheet within the workbook.
But to retrieve them the user has to use the same workbook they have been
saved in. I would like to save these settings outside of Excel so that these
settings will be available to the user regardless of the Excel workbook they
happen to be using. That is, the settings should be user-related and not
workbook-related.

My sense is that these settings should be saved in some sort of cookie or
..ini file or something like that on the user's machine.

What's the current best practice for this, and what is a quick reference
point for how to do this?
 
C

Cindy M.

Hi =?Utf-8?B?U3R1IFc=?=,
I've written an application in VBA using Excel. The application features a
form that the user uses to set various application configuration parameters.
I'm currently saving these user parameters in a sheet within the workbook.
But to retrieve them the user has to use the same workbook they have been
saved in. I would like to save these settings outside of Excel so that these
settings will be available to the user regardless of the Excel workbook they
happen to be using. That is, the settings should be user-related and not
workbook-related.

My sense is that these settings should be saved in some sort of cookie or
..ini file or something like that on the user's machine.

What's the current best practice for this, and what is a quick reference
point for how to do this?
"Best practice" depends on what you need. INI is a possibility. So is the
Registry. Or an XML file (same principle as INI, but more "modern"). Currently,
XML is touted as "the thing to do". You might want to ask in the
excel.programming newsgroup what the specialists there recommend.

In Word, INI and Registry are very simple to do, as there is a special method
provided. For Excel, you're very limited unless you use the Windows API (for INI
or Registry) or set a reference to an outside type library for an XML parser
(such as MSXML).

I don't know of any quick reference points, but the Excel folks in that
newsgroup can probably point you to some.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top