Re: Using INI files

From: Chip Pearson (chip_at_cpearson.com)
Date: 02/12/04


Date: Thu, 12 Feb 2004 09:40:41 -0600

Frank,

You can use INI files or the system registry to save settings
from one session to the next. For example, you can store the
position of a form when it is closed and then display the form in
the same position the next time it is displayed. If the settings
are stored in an INI file or the registry, they will be saved
even if the user exits Excel (or the VB6 program) between uses.

INI files are considered a dated, if not obsolete, approach, and
the generally preferred way is to save settings in the system
registry instead. You can use the GetSetting and SaveSetting VBA
functions to read and write values to the registry.

-- 
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Frank" <anonymous@discussions.microsoft.com> wrote in message
news:ec0201c3f17d$98fd77e0$a301280a@phx.gbl...
> Can some body tell me if there any benefit in using INI
> file with excel applications, I read a mag where it said
> that using INI files to hold items for forms and
> formatting. Has any body here used them I can understand
> using them with VB6 etc etc any feedback will be much
> appreciated .
> Frank


Relevant Pages

  • Re: Does Sonia Colemans MPP/Multimedia download apply to Windows XP?
    ... The first one is labeled Registry Editor, ... MCI settings are in the system Registry. ... Echo ... > Look at the screen shots for the registry settings for WinXP as opposed to> the INI files. ...
    (microsoft.public.powerpoint)
  • Re: square bullets
    ... that it makes backing up programs' settings somewhat easier, ... INI files don't allow multiple levels of hierarchy, ... drop" design, and if each control needs to store its own settings somewhere, ... registry again of course) rather than somehow having to interact with the ...
    (sci.electronics.design)
  • Re: Best Programming Practice?
    ... correctly it shouldn't matter if it's registry, ini, xml or whatever. ... Storing preferences in files does not necessarily equal ini files. ... "new and improved" version of ini files are XML files. ... Paged Pool memory use under windows 2000. ...
    (microsoft.public.windows.terminal_services)
  • Re: .ini .dat or registry question
    ... > Which is better used to store 2 or 3 simple program settings, an ini file, dat file or the registry. ... implementing this with INI files is possible but not as clean. ... you should be fairly restrained about what and how much information you do store in the registry - there ...
    (microsoft.public.vb.winapi)
  • Re: Registry verses INI
    ... If a user doesn't have admin rights on the PC, where is the best place to store the INI file? ... With the registry, I can tell the app to write to the HKEY_CURRENT_USERS area. ... MS said "Don't use INI files anymore. ...
    (microsoft.public.vb.general.discussion)

Loading