PDA

View Full Version : Lost Shortcut functionality



Trashcan Sin
04-17-2011, 08:32 AM
Hello everyone,

This is my first post and I'm probably going to come off as a noob, but I've kind of painted myself into a corner... Any advice would be greatly appreciated.

Last night I was playing around with the application object trying to modify the screen. I must have inadvertently disabled the right clicking functionality. After searching Google for a minute I found you can use the following to get it back when you right click a range.

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

But I still am not able to right click a form or activecontrol button to get a shortcut menu. It just allows me to move it or copy it. I probably should have realized what level I'm at and not gotten into this at all, but...yeah I did...Lesson learned!

Thanks!
Aaron

frank_m
04-17-2011, 09:08 AM
Assuming that you do not have any command bars that are customized or you have and want disabled, give this a try:
Dim Cbar As CommandBar
For Each Cbar In Application.CommandBars

' or you might try adding this next line as well
' Cbar.Reset
Cbar.Enabled = True

Next

Trashcan Sin
04-17-2011, 01:18 PM
Wow Frank. You sir, are a godsend.

Thanks so much for your help!

Aaron

frank_m
04-17-2011, 03:02 PM
Thanks Aaron, but the truth is I handed you a 50 caliber machine gun where only a bow and arrow is needed, if the hunter knows what he is after.

Dim cbar As CommandBar
For Each cbar In Application.CommandBars
If cbar.????? = ????? Then
cbar.Enabled = true
End If
Next cbar

Trashcan Sin
04-17-2011, 03:24 PM
Haha in my case the 50 cal was definitely needed. But that makes perfect sense now. Thanks again.