View Full Version : dissable richt click page setup
Is there a way to dissable the right click & page set up? I still want to be able to right click, but conditionally turn off page setup availability when right clicked.
Thanks.
mbm123
04-04-2011, 04:24 AM
I hope this will help
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True 'disables the right click menu'
** your code here**
end sub
hi mbm123, I need this to happen due to a specific cell > a given number. If that cell = 10 as an example I want to dissable all possibilities of page set up. I currently hide the toolbar which renders using that option unavailable, but if they right click, they are able to select page setup fro that.
So I need to dissable the right click based on criteria.
mbm123
04-04-2011, 06:13 AM
In that case just add an If statement
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
if range("YOUR CELL").value > NUM then
Cancel = True 'disables the right click menu'
end if
** your code here**
End Sub
Did i understand it right?
Ahhh, that works. Thanks you
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.