Using INI files

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

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
 
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
 
They have their benefits and draw backs. I think the current standar
is to use the windows registry now. But I still think it is beneficia
to use a hidden or xlveryhidden sheet to store the data than an in
file. It keeps the data with the spreadsheet, you dont have to worr
about moving the spreadsheet and not the .ini file. This isn't much a
option in vb6 forms, but you have a great data storage mechanis
already built into excel, the worksheets. If you need to hav
updatable entries and defualts that will be the same for multipl
workbooks then a .ini file might be a better choice. Those are m
opinions on the matter.

Keith
www.kjtfs.co
 
Back
Top