View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ed_vak ed_vak is offline
external usenet poster
 
Posts: 1
Default Problem in Excel 2002 vs Excel 97


This code below works fine in Excel 97 on NT.
After one of our machines was upgraded to XP with Excel 2002 it sto
working with Run-time Error 5 on the second "With..." the first one i
OK:

Sub MakeToolBar()

With Application.CommandBars(1).Controls
.Add Type:=msoControlPopup, Befo=11
.Item(.Count).Caption = "GEF Fi&xes"
.Item(.Count).Tag = "GEF Fixes"
End With

With Application.CommandBars("Custom Popup 1").Controls
.Add Type:=msoControlButton, Befo=1
.Item(.Count).Caption = "Fix &Me"
.Item(.Count).OnAction = "FixMe"
End With
End Sub

Any help or ideas will be greatly appreciated.
Thank you.
E

--
ed_va
-----------------------------------------------------------------------
ed_vak's Profile: http://www.excelforum.com/member.php...fo&userid=2477
View this thread: http://www.excelforum.com/showthread.php?threadid=38342