View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Saving Excel Add-In settings

I would always go with an .ini file, but that is a matter of taste.
Always found it 100% reliable, easy and all the possible options you would
want. Make sure to use the API to read and write to .ini files.

RBS


"rael_lucid" wrote in message
...
Hi,

I am writing an Excel 2007 addin that, when run, transfers the data in the
active sheet into a third-party database program (MYOB Accounting).
In order to run the transfer, the user has to select : the MYOB program
executable, the MYOB datafile and then enter their username and password.
I want the user to have to select the datafile, username and password each
time (as they may have multiple datafiles), but the MYOB program
executable
is the same each time. Rather than hardcoding the location (as it may
differ
from PC to PC), I want to store the value somewhere.
The two logical places which come to mind a
1. In the registry
2. In a "config.ini" file in a specific location

Which would you recommend? Is there a third/better option?
Note: this value does not have to be hidden/encrypted or anything like
that.

Thanks in anticipation.

Rael