Tuesday 11 November 2014

Checking the user name and providing the access

Sub Button1_Click()

' Checking the user name and providing the access

If (Application.UserName = "Ramneek Sharma") Or (Application.UserName = "R Sharma") Then

MsgBox ("Welcome" & " " & Application.UserName)

Else
MsgBox ("Access Required")

End If

End Sub

No comments:

Post a Comment