Hi,

Is there a way to hide Command Button for certain user and enable for certain.


I dont know if thats Possible and tried below code but didnt go anywhere:

Sub Button2_Click()

Dim Userpass1 As String

If Userpass1 = "123" Then
ActiveWorkbook.Unprotect ["abcd1234"]
  Sheets("one").Visible = True
  Sheets("Home").Visible = False
  Modules("Button4").Visible = False
  Sheets("one").Protect Password:="1234"
ActiveWorkbook.Protect ["abcd1234"], Structure:=True, Windows:=False

Else

MsgBox "wrong password!"

End If
End Sub

I am getting error at the module part.

If hiding the Commad Button is not possible, is there a way to disable it and also to change its color (red preferred) so that user know its inactive.

Thanks in Advance.

Reg,
CVishu