user authentication in excel
I’m new to VB/excel. Any help is greatly appreciated.
We have a requirement to capture changes made to the data in excel, along with the user who made the change, into Oracle database. We are able to successfully save the data to Oracle.
I was wondering if user authentication can be done in excel and somehow save the username till the excel is closed.
Thank you.
Re: user authentication in excel
Welcome to the Forums.
The most accurate way is to use the Windows logged on User Name. You can retrieve it with code like I have posted here - http://vbforums.com/showthread.php?t=357723
Just place the code in a module in your VBA IDE.
Re: user authentication in excel
Thank you.
My requirement is to authenticate with the user profile stored in Oracle.
Is this a good idea - the macro which saves the data to oracle will prompt the user for username/password, pass the credentials to the backend (currently I have a java socket program in the backend to process the excel data) and validate the user. If its a valid username continue with the save.
If the userId is valid save it some place (don't know where) for future use (until the excel is closed).
Please correct me if I'm wrong. I'd appreciate any help.
Re: user authentication in excel
I think that sounds good.. create a global variable (Boolean) that, once authenticated, is set to True... so u can refer back to it for the next saves...