Hello, can somebody help me? I'm creating a macro file that will be used by around 15 coworkers, but I want only to show certain buttons depending on their role.
For example:
Workers 1,2,4 and 5 will be able to view 4 macro buttons
Workers 3,6,7 and 8 will be able to view 4 diferent macro buttons, not accesible to the previous set of workers.
So far, I found this code to get the username from the person who opens the macro file
Dim ObjWshNw As Object
Set ObjWshNw = CreateObject("WScript.Network")
MsgBox ObjWshNw.UserName
Select Case ObjWshNw.UserName
Case "Worker1"
MsgBox "Hello"
Case Else
MsgBox "Hello Stranger"
End Select
That's no issue, what I want to do is to put a command that enables/disables viewing certain ActiveX buttons depending on the user that opens the workbook.
Bookmarks