• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Macro Hacks > 67. Store Settings and Data in .ini Files

Store Settings and Data in .ini Files

VBA includes a way to store and retrieve information using plain-text files that are easy to create, easy to edit, and easy to remove.

Before Windows 95 came along with the Windows registry for storing system information, Windows used .ini files—text files used to store program-specific data. Many programs, and even Windows, still use these files to store certain information. A search on your hard drive for *.ini files will likely turn up dozens or even hundreds of entries.

These files are very useful for storing data after a macro finishes running in VBA, or for things like numbering documents sequentially [Hack #77] and creating an improved MRU [Hack #13] after Word closes.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint