Consulting

Results 1 to 17 of 17

Thread: Right click

  1. #1

    Right click

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

  2. #2
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Does the right click work in other software?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    yeah work in word and other program , but except in excel not work

  4. #4
    Hi
    No suggestion

  5. #5
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    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]

    Place in the This Workbook module and let us know the result
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  6. #6
    Hi Aussiebear
    I will try it , and reply you
    Thank you

  7. #7
    yes it's working

  8. #8
    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

  9. #9
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    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 [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  10. #10
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Are you saying that the error still occurs in the existing workbooks?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  11. #11
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    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]

    And the commandbar would be:
    [VBA]Application.CommandBars("Cell")[/VBA]

    Look for these and let us know.
    Regards,
    --------------------------------------------------------------------------------------------------------
    Shrivallabha
    --------------------------------------------------------------------------------------------------------
    Using Excel 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  12. #12
    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

  13. #13
    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]
    Hi shrivallabha
    This part from (Aussiebear) works well



    And the commandbar would be:
    [VBA]Application.CommandBars("Cell")[/VBA]
    But this line , when I put it in the code , give me error


    Look for these and let us know.

  14. #14
    VBAX Expert shrivallabha's Avatar
    Joined
    Jan 2010
    Location
    Mumbai
    Posts
    750
    Location
    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 2016 in Home / 2010 in Office
    --------------------------------------------------------------------------------------------------------

  15. #15
    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

  16. #16
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    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 [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  17. #17
    Hi Aussiebear
    Ok i will
    thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •