PDA

View Full Version : [SOLVED] How to hide the sub popup menu



levanduyet
02-24-2009, 11:56 PM
Dear All,

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

http://i2.photobucket.com/albums/y4/levanduyet/PopUpMenu1.gif

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

Tks,

LVD

GTO
02-25-2009, 12:18 AM
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

Charlize
02-25-2009, 05:14 AM
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

Bob Phillips
02-25-2009, 05:42 AM
I think he wants to hide just the formatting task pane.

levanduyet
02-25-2009, 06:50 PM
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

Digita
02-25-2009, 08:37 PM
Hello Duyet,

I don't use XL 12 often so don't have an answer for you. However, this link (http://msdn.microsoft.com/en-us/library/bb608590.aspx) may help.

Regards

levanduyet
02-26-2009, 10:13 AM
Hello Duyet,

I don't use XL 12 often so don't have an answer for you. However, this link (http://msdn.microsoft.com/en-us/library/bb608590.aspx) may help.

Regards

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

LVD

Ken Puls
02-26-2009, 04:03 PM
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,

mdmackillop
02-27-2009, 11:31 AM
Doesn't do anything for me either Ken.

Ken Puls
02-27-2009, 03:11 PM
Malcolm, do the manual steps to disable it work for you?

mdmackillop
02-27-2009, 03:19 PM
No,
I thought mini toolbar would be the way to go, but I couldn't see what it did (or was meant to do)

Ken Puls
02-27-2009, 03:57 PM
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
02-27-2009, 05:30 PM
Oh, this is bizarre... Ron de Bruin worked it out:

Application.ShowMenuFloaties = True

Sounds to me like someone messed that up, but it works!

mdmackillop
02-27-2009, 07:15 PM
Who would have thunk it?:fainted: