VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Excel Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 04-30-2012, 02:04 PM   #1
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Right click

Hi
In my Excel right click not working
What should i do
Thank you

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 04-30-2012, 03:25 PM   #2
Aussiebear
 
Aussiebear's Avatar
Moderator

 
Joined: Dec 2005
Posts: 2,765
Kb Entries: 0
Articles: 0
Does the right click work in other software?


Remember To Do the Following....

Use the VBA button to correctly submit your code to the forum. Mark your thread as Solved if satisfied by using the Thread Tools options

Local Time: 07:52 PM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 04-30-2012, 03:49 PM   #3
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
yeah work in word and other program , but except in excel not work

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-05-2012, 06:04 AM   #4
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Hi
No suggestion

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-05-2012, 06:19 AM   #5
Aussiebear
 
Aussiebear's Avatar
Moderator

 
Joined: Dec 2005
Posts: 2,765
Kb Entries: 0
Articles: 0
Try the following in a new workbook and see if it works.
VBA:
Sub Enable_All_Right_Click_Menus() 'This will enable all BuiltIn Command bars Dim Cbar As CommandBar For Each Cbar In Application.CommandBars Cbar.Enabled = True Next End Sub
VBA tags courtesy of www.thecodenet.com

Place in the This Workbook module and let us know the result


Remember To Do the Following....

Use the VBA button to correctly submit your code to the forum. Mark your thread as Solved if satisfied by using the Thread Tools options

Local Time: 07:52 PM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-05-2012, 06:25 AM   #6
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Hi Aussiebear
I will try it , and reply you
Thank you

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-05-2012, 06:26 AM   #7
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
yes it's working

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-05-2012, 06:29 AM   #8
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
but should I always use this code when i use excel
I want know what's the problem
and why I can't use right click without code

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-05-2012, 05:36 PM   #9
Aussiebear
 
Aussiebear's Avatar
Moderator

 
Joined: Dec 2005
Posts: 2,765
Kb Entries: 0
Articles: 0
Not sure. For some reason Excel's command bars are not being read correctly on loading, hence the loss of the right click function. I was hoping that someone with more experience could assist here.


Remember To Do the Following....

Use the VBA button to correctly submit your code to the forum. Mark your thread as Solved if satisfied by using the Thread Tools options

Local Time: 07:52 PM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-05-2012, 05:37 PM   #10
Aussiebear
 
Aussiebear's Avatar
Moderator

 
Joined: Dec 2005
Posts: 2,765
Kb Entries: 0
Articles: 0
Are you saying that the error still occurs in the existing workbooks?


Remember To Do the Following....

Use the VBA button to correctly submit your code to the forum. Mark your thread as Solved if satisfied by using the Thread Tools options

Local Time: 07:52 PM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-06-2012, 01:53 AM   #11
shrivallabha
 
shrivallabha's Avatar

 
Joined: Jan 2010
Posts: 697
Kb Entries: 1
Articles: 0
Quote:
 
Originally Posted by: thair younis
but should I always use this code when i use excel
I want know what's the problem
and why I can't use right click without code

It will happen when you have some other code which wants to "disable" right click for some reason. Check the codes that you run regularly, one of them will be having a code which will be opposite of what Aussiebear has provided.
VBA:
Cbar.Enabled = "False"
VBA tags courtesy of www.thecodenet.com

And the commandbar would be:
VBA:
Application.CommandBars("Cell")
VBA tags courtesy of www.thecodenet.com

Look for these and let us know.


Regards,
--------------------------------------------------------------------------------------------------------
Shrivallabha
--------------------------------------------------------------------------------------------------------
Using Excel 2007 (Home / Office) on Win XP
--------------------------------------------------------------------------------------------------------

Local Time: 04:52 AM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-06-2012, 03:45 AM   #12
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Quote:
 
Originally Posted by: Aussiebear
Are you saying that the error still occurs in the existing workbooks?


Hi Aussiebear
yeah the error still in my Excel

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-06-2012, 03:59 AM   #13
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Quote:
 
Originally Posted by: shrivallabha
It will happen when you have some other code which wants to "disable" right click for some reason. Check the codes that you run regularly, one of them will be having a code which will be opposite of what Aussiebear has provided.
VBA:
Cbar.Enabled = "False"
VBA tags courtesy of www.thecodenet.com
Hi shrivallabha
This part from (Aussiebear) works well



And the commandbar would be:
VBA:
Application.CommandBars("Cell")
VBA tags courtesy of www.thecodenet.com
But this line , when I put it in the code , give me error


Look for these and let us know.


Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-07-2012, 06:14 AM   #14
shrivallabha
 
shrivallabha's Avatar

 
Joined: Jan 2010
Posts: 697
Kb Entries: 1
Articles: 0
Hi thair,

What I meant to say is:

1. Do you run some more macros other than the one posted by aussiebear above?
If yes, then search up those macros if they are disabling right-click completely.

2. What I have given is a sort of keyword for searching i.e. search criterion.

3. If you find such code then you will come to know about the reason why your right click doesn't work.

I hope this helps you.


Regards,
--------------------------------------------------------------------------------------------------------
Shrivallabha
--------------------------------------------------------------------------------------------------------
Using Excel 2007 (Home / Office) on Win XP
--------------------------------------------------------------------------------------------------------

Local Time: 04:52 AM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-07-2012, 09:58 AM   #15
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
What I meant to say is:

1. Do you run some more macros other than the one posted by aussiebear above?
If yes, then search up those macros if they are disabling right-click completely.


Hi shrivallabha

I just run his aussiebear code not any other code

Thank you for replied me

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Old 05-07-2012, 03:00 PM   #16
Aussiebear
 
Aussiebear's Avatar
Moderator

 
Joined: Dec 2005
Posts: 2,765
Kb Entries: 0
Articles: 0
Have a look in the last couple of Excel files you were using before the right click function failed. As Shrivallabha has been quietly suggesting, there might well be some code in there that changes the right click function. This is something that you need to do as we do not have access to your files. If you find something or think you've found something, please feel free to post it.


Remember To Do the Following....

Use the VBA button to correctly submit your code to the forum. Mark your thread as Solved if satisfied by using the Thread Tools options

Local Time: 07:52 PM
Local Date: 05-24-2013
Location:

 
Reply With Quote Top
Old 05-08-2012, 04:04 AM   #17
thair younis

 
Joined: Aug 2011
Posts: 58
Kb Entries: 0
Articles: 0
Hi Aussiebear
Ok i will
thank you

Local Time: 01:52 AM
Local Date: 05-24-2013

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 02:52 AM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express