Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent deactivation of sheet
Hi
In my workbook I have a number of sheets. Each sheet has certain cells that must have specific values for my calculations on that sheet. I have a procedure that checks whether everything is correct on a sheet. I want the user to not be able to open the next sheet unless everything is correct on the current sheet, but am struggling because there is not a "BeforeDeactivate" or "BeforeActivate" procedure for the sheets. Can anyone help? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Prevent deactivation of sheet
Try this:-
Code:
Private Sub Worksheet_Deactivate() If Range("a1") < True Then Worksheets("sheet1").Select MsgBox "You have not completed all the details.", vbCritical, "Incomplete detail" End If End Sub you could put a similar thing into the workbook module too. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Prevent printing a sheet | Excel Discussion (Misc queries) | |||
Prevent unhide sheet | Excel Worksheet Functions | |||
Prevent sheet deletion | Excel Discussion (Misc queries) | |||
Prevent sheet add or delete | Excel Programming | |||
Prevent copying sheet | Excel Programming |