Excel 2007 & Custom Shortcut Menues

Z

ZipCurs

I am a bit confused. I created a macro with custom shortcut menus and it
works fine on my computer and atleast one other computer when running in
2007. Recently, when the macro was run on another computer, which just had
Excel 2007 installed, everything worked fine except the the custom shortcut
menu did not work. The standard menu came up instead.

Any thoughts about how to resolve this? Is it the code? Is it Excel
settings? Any help would be appreciated. Thank you in advance.
 
J

joel

the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.
 
Z

ZipCurs

Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.
 
R

Ron de Bruin

If you change the Cell menu with VBA it wil work in 2003 and in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.

joel said:
the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=161892

Microsoft Office Help

.
 
Z

ZipCurs

Hello Ron,

Thank you for responding. This is the VBA code that I have been using:

'Hide standard short cut menu
For Each icbc In Application.CommandBars("cell").Controls
icbc.Visible = False
Next icbc

'Add new buttons, added navigation and filter button as part of V0.5,
4March2008
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, before:=1, temporary:=True)
.Caption = "Edit Object"
.OnAction = "MyFirstMacro"
End With

This works fine in 2003 and most 2007 machines. It does not work on one
machine with 2007. In the case when the it does not work, the default Excel
short cut menu comes up. A copy of the file works fine on my machine,
running Excel 2007. Is there something with the most recent version of Excel
2007? Are there some settings that would cause this? Is it the computer
configuration? Is it the operating system? I have no clue. Any thoughts or
guidance would be greatly appreciated.

Ron de Bruin said:
If you change the Cell menu with VBA it wil work in 2003 and in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.

joel said:
the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=161892

Microsoft Office Help

.
.
 
R

Ron de Bruin

Hi ZipCurs

Two possible problems

problem 1: there is other code in a add-in or workbook that reset the Cell menu
problem 2: the xlb file on the machine is corrupt

1) Close Excel
2) Do a search for .xlb in Windows (Use: search hidden files and folders)
3) Rename or delete the .xlb file or files (In 2002 the name = Excel10.xlb)
4) Start Excel

Deleting the file or renaming will do no harm to your system
Excel will create a new file for you. (You lost your customization remember that)
If you make your own toolbars or add buttons to the others
this file is important (backup it so you can restore it)



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Ron,

Thank you for responding. This is the VBA code that I have been using:

'Hide standard short cut menu
For Each icbc In Application.CommandBars("cell").Controls
icbc.Visible = False
Next icbc

'Add new buttons, added navigation and filter button as part of V0.5,
4March2008
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, before:=1, temporary:=True)
.Caption = "Edit Object"
.OnAction = "MyFirstMacro"
End With

This works fine in 2003 and most 2007 machines. It does not work on one
machine with 2007. In the case when the it does not work, the default Excel
short cut menu comes up. A copy of the file works fine on my machine,
running Excel 2007. Is there something with the most recent version of Excel
2007? Are there some settings that would cause this? Is it the computer
configuration? Is it the operating system? I have no clue. Any thoughts or
guidance would be greatly appreciated.

Ron de Bruin said:
If you change the Cell menu with VBA it wil work in 2003 and in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.

:


the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=161892

Microsoft Office Help

.
.
 
Z

ZipCurs

Bingo!!! Thank you very much Ron. Deleting the xlb file did the trick.
Everything is apparently running fine now.

Ron de Bruin said:
Hi ZipCurs

Two possible problems

problem 1: there is other code in a add-in or workbook that reset the Cell menu
problem 2: the xlb file on the machine is corrupt

1) Close Excel
2) Do a search for .xlb in Windows (Use: search hidden files and folders)
3) Rename or delete the .xlb file or files (In 2002 the name = Excel10.xlb)
4) Start Excel

Deleting the file or renaming will do no harm to your system
Excel will create a new file for you. (You lost your customization remember that)
If you make your own toolbars or add buttons to the others
this file is important (backup it so you can restore it)



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Ron,

Thank you for responding. This is the VBA code that I have been using:

'Hide standard short cut menu
For Each icbc In Application.CommandBars("cell").Controls
icbc.Visible = False
Next icbc

'Add new buttons, added navigation and filter button as part of V0.5,
4March2008
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, before:=1, temporary:=True)
.Caption = "Edit Object"
.OnAction = "MyFirstMacro"
End With

This works fine in 2003 and most 2007 machines. It does not work on one
machine with 2007. In the case when the it does not work, the default Excel
short cut menu comes up. A copy of the file works fine on my machine,
running Excel 2007. Is there something with the most recent version of Excel
2007? Are there some settings that would cause this? Is it the computer
configuration? Is it the operating system? I have no clue. Any thoughts or
guidance would be greatly appreciated.

Ron de Bruin said:
If you change the Cell menu with VBA it wil work in 2003 and in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.

:


the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=161892

Microsoft Office Help

.

.
.
 
R

Ron de Bruin

You are welcome, thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Bingo!!! Thank you very much Ron. Deleting the xlb file did the trick.
Everything is apparently running fine now.

Ron de Bruin said:
Hi ZipCurs

Two possible problems

problem 1: there is other code in a add-in or workbook that reset the Cell menu
problem 2: the xlb file on the machine is corrupt

1) Close Excel
2) Do a search for .xlb in Windows (Use: search hidden files and folders)
3) Rename or delete the .xlb file or files (In 2002 the name = Excel10.xlb)
4) Start Excel

Deleting the file or renaming will do no harm to your system
Excel will create a new file for you. (You lost your customization remember that)
If you make your own toolbars or add buttons to the others
this file is important (backup it so you can restore it)



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


ZipCurs said:
Hello Ron,

Thank you for responding. This is the VBA code that I have been using:

'Hide standard short cut menu
For Each icbc In Application.CommandBars("cell").Controls
icbc.Visible = False
Next icbc

'Add new buttons, added navigation and filter button as part of V0.5,
4March2008
With Application.CommandBars("cell").Controls _
.Add(Type:=msoControlButton, before:=1, temporary:=True)
.Caption = "Edit Object"
.OnAction = "MyFirstMacro"
End With

This works fine in 2003 and most 2007 machines. It does not work on one
machine with 2007. In the case when the it does not work, the default Excel
short cut menu comes up. A copy of the file works fine on my machine,
running Excel 2007. Is there something with the most recent version of Excel
2007? Are there some settings that would cause this? Is it the computer
configuration? Is it the operating system? I have no clue. Any thoughts or
guidance would be greatly appreciated.

:

If you change the Cell menu with VBA it wil work in 2003 and in 2007


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Hello Joel,

Thank you for your answer. I am pretty sure that I did not explain the
problem well. I am having issues with the short cut menus that pop up when
you right click over a cell. On my computer running Excel 2007, the custom
menus works fine. On at least one other computer, right clicking brings up
the stand short cut menu. The only clue that I have is that this computer
just had Excel 2007 loaded onto it.

So far, it has only been on one computer that there is an issue. Excel 2003
continues to work well. Again, any help you could provide would be greatly
appreciated.

:


the top level menu names are different in 2003 and 2007. If you code
say to instal a menu after Windows (menu option in 2003) there wil not
be a menu called Window in 2007 and the code will not work without
changing the location to install the menu. One solution would be to get
a count of the number of menu items and then install the new menu after
the last menu.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=161892

Microsoft Office Help

.

.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top