View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] peter.bostrom@ericsson.com is offline
external usenet poster
 
Posts: 1
Default OnAction command failure

I use Excel 2000. My problem is that the following code
works only on my computer. I have tested the same code
on five different Excel 2000 computers but it works only
for me. The Toolsoptions, ToolsVBA project properties,
toolsdigital signature and toolsreferences
settings are the same for all (five) computers.
Any help is most appreciated.

Sub DropDownMenu5()
Set NewMenu = MenuBars(xlWorksheet).Menus.Add
(Caption:="ID Filter", Befo="Help")
Set MenuItemAdded = MenuBars(xlWorksheet).Menus("ID
Filter").MenuItems.Add(Caption:="1",
OnAction:="'DataFiltera 1'")
Set MenuItemAdded = MenuBars(xlWorksheet).Menus("ID
Filter").MenuItems.Add(Caption:="2",
OnAction:="'DataFiltera 2'")
End Sub

Sub DataFiltera(Kriteria As Integer)
Select Case Kriteria
Case 1
Sheets("Sheet1").Range("A2") = "value 1"
Case 2
Sheets("Sheet1").Range("A2") = "value 2"
End Select
End Sub