Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
It wont stop users switching to another workbook, but if you wanted it to,
you could put a similar thing into the workbook module too.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent printing a sheet LindaC Excel Discussion (Misc queries) 3 January 13th 10 06:32 PM
Prevent unhide sheet acss Excel Worksheet Functions 2 October 29th 08 04:56 AM
Prevent sheet deletion G and (ajk) Excel Discussion (Misc queries) 2 March 9th 07 09:18 AM
Prevent sheet add or delete Glen Mettler[_2_] Excel Programming 1 January 22nd 05 05:38 PM
Prevent copying sheet PAM Excel Programming 2 July 8th 04 08:54 PM


All times are GMT +1. The time now is 05:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"