View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Storing data in an add-in for use later

What you are asking is reasonably straight forward. In your project and a
module to store global variables. In that module define a user name variable
and a password variable.

Add a user form which prompts the user for their name and password. The user
form should have a command button that connects and disconnects from the
database to confirm that the name and password are valid. If so then store
the name and password in the globals.

I assume that your addin has some kind of toolbar or menu for the user to
interact with. When the user tries to interact with the database the first
thing it does is checks for the global username and password. If one exists
then it does it's business. If not then it shows the user form...
--
HTH...

Jim Thomlinson


"Bythsx-Addagio" wrote:

Hello,
I have an add-in which multiple users use. Some of the features involve
querying a SQL Database which requires a password. I would like to be able
to code the add-in to prompt the user for their password and store it
somewhere so it will be available the next time the add-in is used. Does
anyone have any suggestions on how best to achieve this?

Thanks,
b