ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   enable right click (https://www.excelbanter.com/excel-programming/347958-enable-right-click.html)

tommy_gtr[_26_]

enable right click
 

hello,

I use the following code to hide all command bars in my excel file:
Private Sub Workbook_Open()

Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False 'here to change
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub

but it also disable a mouse right click.

Can anyone help how to enable right click when other command bars are
hide.

thanks a lot

tommy


--
tommy_gtr
------------------------------------------------------------------------
tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089
View this thread: http://www.excelforum.com/showthread...hreadid=492981


Norman Jones

enable right click
 
Hi Tommy,

Try:

Application.CommandBars("Cell").Enabled = True


---
Regards,
Norman


"tommy_gtr" wrote in
message ...

hello,

I use the following code to hide all command bars in my excel file:
Private Sub Workbook_Open()

Dim oCB As CommandBar
For Each oCB In Application.CommandBars
oCB.Enabled = False 'here to change
Next oCB

mFormulaBar = Application.DisplayFormulaBar
Application.DisplayFormulaBar = False
End Sub

but it also disable a mouse right click.

Can anyone help how to enable right click when other command bars are
hide.

thanks a lot

tommy


--
tommy_gtr
------------------------------------------------------------------------
tommy_gtr's Profile:
http://www.excelforum.com/member.php...o&userid=26089
View this thread: http://www.excelforum.com/showthread...hreadid=492981




tommy_gtr[_27_]

enable right click
 

great :-)))

it works ...

Thank you


tommy


--
tommy_gtr
------------------------------------------------------------------------
tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089
View this thread: http://www.excelforum.com/showthread...hreadid=492981



All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com