Consulting

Results 1 to 14 of 14

Thread: How to hide the sub popup menu

  1. #1
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location

    How to hide the sub popup menu

    Dear All,

    When I right-click on the excel sheet, I get the menu as the following picture:



    How I write the code to hide the sub popup menu (1)?
    I use Excel 2007.

    Tks,

    LVD
    Last edited by levanduyet; 02-25-2009 at 12:39 AM.

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings :-)

    Say, I hate to ask a question when I have absolutely no help to give, as I believe you must have 2007 (and I do not).

    Anyways, if not a bother, how did you get that style (the tore edges and all) of screenshot?

    Mark

  3. #3
    VBAX Master
    Joined
    Jul 2006
    Location
    Belgium
    Posts
    1,286
    Location
    If it's for a certain worksheet, change the beforerightclick-event of the worksheet.
    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    Cancel = True
    End Sub
    If it's for all the worksheets in the workbook, use this

    Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
    ByVal Target As Range, Cancel As Boolean)
    Cancel = True
    End Sub
    Charlize
    Last edited by Aussiebear; 04-08-2023 at 12:45 PM. Reason: Adjusted the code tags

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I think he wants to hide just the formatting task pane.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Dear CharLize,

    I just want to hide the popup menu 1. Pls see the picture. (not the normal popup menu like in Excel 2003). The popup menu that I want to hide is the popup menu regarding font, font size, aligment,...

    Tks,

    LVD

  6. #6
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    144
    Location
    Hello Duyet,

    I don't use XL 12 often so don't have an answer for you. However, this link may help.

    Regards

  7. #7
    VBAX Regular levanduyet's Avatar
    Joined
    Jul 2007
    Location
    HCMC
    Posts
    46
    Location
    Quote Originally Posted by Digita
    Hello Duyet,

    I don't use XL 12 often so don't have an answer for you. However, this link may help.

    Regards
    Thanks Digita,
    The link that you given to me, it discuss about difference object.
    Anyway, thank you.

    LVD

  8. #8
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    I believe that the code you're after is:
    Application.ShowMenuFloaties = False
    Application.ShowSelectionFloaties =False
    In my tests here, though, it doesn't actually do anything. In fact, I still get the mini toolbar even after going into Office-->Excel Options-->Popular and un-checking "Show Mini Toolbar on Selection"

    Hope it works on yours,
    Last edited by Aussiebear; 04-08-2023 at 12:46 PM. Reason: Adjusted the code tags
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  9. #9
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Doesn't do anything for me either Ken.
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  10. #10
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Malcolm, do the manual steps to disable it work for you?
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  11. #11
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    No,
    I thought mini toolbar would be the way to go, but I couldn't see what it did (or was meant to do)
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  12. #12
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    It's weird. The steps in the UI that you can do manually do turn off what I believe are the "selection floaties" I can actually see the difference there, although it's more obvious in Word than Excel. I would have expected that the "menu floaties" would have hit the menus. I'm wondering if there is a bug there, or it just something different that I'm not seeing.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  13. #13
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Oh, this is bizarre... Ron de Bruin worked it out:
    Application.ShowMenuFloaties = True
    Sounds to me like someone messed that up, but it works!
    Last edited by Aussiebear; 04-08-2023 at 12:47 PM. Reason: Adjusted the code tags
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  14. #14
    Administrator
    VP-Knowledge Base VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Who would have thunk it?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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