a big problem after run macro in exel

abdelfattah

Well-known Member
Joined
May 3, 2019
Messages
1,429
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
hello
i have a big problem when i tested this code type of protection it hide command bar when i right click does not show but when i change to true it also doesn't change it supposes showing the menu when right click
this is the macro
VBA Code:
Sub cc()
  Application.CommandBars("Worksheet Menu Bar").Enabled = false

End Sub
thanks

thanks
 
VBA Code:
Option Explicit

Sub disable()
'This code line will disable the Cell menu (menu what you see when you right click on a cell/range)
Application.CommandBars("Cell").Enabled = False
End Sub

Sub enable()
'This code line will disable the Cell menu (menu what you see when you right click on a cell/range)
Application.CommandBars("Cell").Enabled = True
End Sub

Download example workbook : Rt Click Disable.xlsm
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
about your file i have ever told you i can't download it just open amazon website if is possible upload to another website and unfortunately macro enable doesn't work
 
Upvote 0
Forgive me for intervening here but it would be better @abdelfattah you put the code in a NEW workbook to test it
and then tell @Logit what else the code must do
 
Upvote 0
hi, Yongle thanks for your advise actually , i did it nothing happened i 'm afraid i missed doing something but i no know what it is
 
Upvote 0
Upvote 0
thanks logit but all of links above don't help to solve my problem theses steps i know i think reinstall the office
 
Upvote 0
@abdelfattah
Have you considered uploading your workbook to a hosting site, Dropbox for instance, then posting the link to that file back here
AND
a clear and concise description of your problem and what you expect as a solution.
 
Upvote 0
hi, logit actually i note the menu only show when i press right click into any cell but when i right click in header row or column or tab sheet not show the menu after run many macros and show in the bar menu two macros show bar and hide bar
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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