PDA

View Full Version : accepting and storing a user/password temporarily?



sickmint79
01-24-2013, 01:37 PM
new/low level vba guy here, looking for a good solution to my security problem.

right now i'm updating an excel sheet with some dynamic queries. every time i run the queries, i prompt the user for the username and password in plaintext boxes. i'm not too concerned about the password being sent in plaintext; it would be nice to not repeatedly prompt someone once they've given me it. i will do it each time they click a refresh button and run a sql query again.

i could store the user/pass in some cells (where i do things like the server ip) - but i don't want them stored there as the spreadsheet may be sent from one person to the next.

so my question is, can i accept the user/pass and then keep them somewhere so that the user will not be prompted again until the spreadsheet is re-opened? can this be a location that others can't see and that no one will see should the spreadsheet be saved and sent to someone else? thanks!

Kenneth Hobs
01-24-2013, 01:48 PM
Welcome to the forum!


Public pw as string

Sub Test
pw = "Result from your inputbox or other control in a userform"
End Sub