Discussion Locked

VBA/Excel - Status Bar

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I would like to show a "PRT" in the status bar of Excel when my workbook is protected. This would work very much like Num Lock and how "NUM" is displayed when Num Lock is on. Does anyone know how to code this?

4 replies

by dklippert

You could use this as an Auto_Open macro or as an Event macro:

Sub Status_PRT()

If Worksheets("Sheet1").ProtectContents = True Then
Application.StatusBar = "PRT"
Else
Application.StatusBar = False
End If

End Sub

by cbdepadua

Answer1: Shows "PRT" on the left side of the Status bar. I would rather show it on the right side where "NUM" is shown. Is this possible?

This discussion is closed to new replies.