Set the form's KeyPreview to True then add code similar to this.
Change cntlX to your control nameCode:Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) Static bShow As Boolean If KeyCode = vbKeyE Then If Shift = 1 Then bShow = Not bShow cntlX.Visible = bShow End If End If End Sub
It will toggle when you hit Shift + E, you can change the key to whatever you like.
P.S. this could be called an Easter Egg




Reply With Quote