If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Restrict / Provide access to users to a macro through a sql database list.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-10-09, 15:29
abhay_547 abhay_547 is offline
Registered User
 
Join Date: Sep 2009
Posts: 78
Restrict / Provide access to users to a macro through a sql database list.

Hi All,

I have macro with a userform which extracts some data from a sql database based on the parameters selected in it. i have circulated this macro to my team members now i want a macro code which will check a list which is maintained by me in a form of table in a sql database and allow the user to use that macro only when his name / xp id is updated in that list. For eg :

Sub CheckAccess()
myusername = Environ("username")
If myusername <> mydatabase Then
'now i want a code which should check the existence of his xp user id in my sql database table if it doesn't exist in that table then should show following message.
MsgBox "Not an Authorized User"
End if
End Sub

Thanks a lot your help in advance.
Reply With Quote
  #2 (permalink)  
Old 09-17-09, 22:35
abhay_547 abhay_547 is offline
Registered User
 
Join Date: Sep 2009
Posts: 78
Hi All,

I have macro with a userform which extracts some data from a sql database based on the parameters selected in it. i have circulated this macro to my team members now i want a macro code which will check a list which is maintained by me in a form of table in a sql database and allow the user to use that macro only when his name / xp id is updated in that list. For eg :

Sub CheckAccess()
myusername = Environ("username")
If myusername <> mydatabase Then
'now i want a code which should check the existence of his xp user id in my sql database table if it doesn't exist in that table then should show following message.
MsgBox "Not an Authorized User"
End if
End Sub

Thanks a lot your help in advance.
Reply With Quote
  #3 (permalink)  
Old 05-06-11, 12:13
abhay_547 abhay_547 is offline
Registered User
 
Join Date: Sep 2009
Posts: 78
test data for check
Quote:
Originally Posted by abhay_547 View Post
Hi All,

I have macro with a userform which extracts some data from a sql database based on the parameters selected in it. i have circulated this macro to my team members now i want a macro code which will check a list which is maintained by me in a form of table in a sql database and allow the user to use that macro only when his name / xp id is updated in that list. For eg :

Sub CheckAccess()
myusername = Environ("username")
If myusername <> mydatabase Then
'now i want a code which should check the existence of his xp user id in my sql database table if it doesn't exist in that table then should show following message.
MsgBox "Not an Authorized User"
End if
End Sub

Thanks a lot your help in advance.

Last edited by abhay_547; 05-06-11 at 13:37.
Reply With Quote
  #4 (permalink)  
Old 05-23-11, 07:01
abhay_547 abhay_547 is offline
Registered User
 
Join Date: Sep 2009
Posts: 78
Quote:
Originally Posted by abhay_547 View Post
test data for check
pls find the test data

Last edited by abhay_547; 05-23-11 at 13:08.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On