Attachments
Last edited:
Sub TextBox_Click()
Application.ScreenUpdating = False
On Error Resume Next
UN = Environ("username")
If UN = Empty Then UN = Application.UserName
yUN = WorksheetFunction.Match(UN, Sheets("GRPS").Range("C:C"), 0)
If Err.Number = 0 Then
shtname = ActiveSheet.Shapes(Application.Caller).TextFrame.Characters.Text
xUN = WorksheetFunction.Match(shtname, Sheets("GRPS").Range("9:9"), 0)
If Err.Number = 0 And Sheets("GRPS").Cells(yUN, xUN) <> Empty Then
Err.Clear
With Worksheets(shtname)
.Visible = xlSheetVisible
.Activate
.Range("A1").Select
End With
If Err.Number <> 0 Then MsgBox "You Selected An UnKnown Sheet!"
Else
msg = "Unknown Sheet!"
If Err.Number = 0 Then msg = "You Don't Have Permit To See That Selection!"
MsgBox msg
End If
Else
MsgBox "You Are UnKnown User!"
End If
Application.ScreenUpdating = True
End Sub