Msgbox to unprotect worksheet on first activation only?

Ironman

Board Regular
Joined
Jan 31, 2004
Messages
190
Hello

I created a simple msgbox to remind me to unprotect a particular worksheet that is protected when the workbook is opened (there are 12 other tabs that aren't protected).

VBA Code:
Private Sub Worksheet_Activate()

MsgBox "Unprotect Worksheet ", vbInformation, "Daily Tracking"

Is it possible for a line or two of code that stops any further (irrelevant) messages when I have unprotected the sheet, while the workbook is still open?

Thanks!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,818
VBA Code:
Private Sub Worksheet_Activate()
    If Me.ProtectContents Then
        MsgBox "Unprotect Worksheet ", vbInformation, "Daily Tracking"
    End If
End Sub
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,133,243
Messages
5,657,575
Members
418,401
Latest member
B_A_M155

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top