RE: Applying business logic in navigating between Worksheets

Dhimit

Board Regular
Joined
Jul 24, 2007
Messages
195
RE: Applying business logic in navigating between Worksheets

Hi,

Is it possible to prevent user 'toggling' to another worksheet unless it meets a condition in the current worksheet ?!

i.e 'Lock' the current worksheet until an action is completed.

Dhimit
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I beleive what you want is to add code to the following subroutine in MyWorkbook...

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
if 'your code looking at the required condition not met Then
'some witty message
End
else
'go ahead and switch sheets
End Sub
 
Upvote 0
Re:

Thanks for your prompt response.

Do you mind giving me the EXACT syntax since my business logic is quite simple :

IF (Worksheet Cell Value < 0) OR
(Worksheet Cell Value > 0)
THEN don't switch sheets
ELSE switch sheets
END IF

Do you also mind directing me where to place this code from the menu options ?!

Dhimit :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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
Back
Top