View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Deleting menu (xla)

Hi Ravi

You have a space after the d
Wizard ").

--
Regards Ron de Bruin
http://www.rondebruin.nl


"ravi" wrote in message ...
I have a probelem with some code I got from the book Excel 2000
Power Programming with VBA by John Walkenbach .

The loan Amortization wizard code/utility is causing a problem .Its an xla
file .It
creates a new submenu on the tools menu every time I open it .I am
unable to delete it from my tools menu. I tried running the following
code to delete them it did not work.

Sub DeleteIt()
Dim DataMenu As CommandBarPopup
Set DataMenu = CommandBars(1).FindControl(ID:=30007)
On Error Resume Next
DataMenu.Controls("Loan Amortization Wizard ").Delete
End Sub

tools menu sort of looks like this

tools
Spelling
AutoCorrect
.
.
.
Loan Amortization Wizard
Loan Amortization Wizard
Loan Amortization Wizard

Is there any way I could delete it ?


Thanks,


Ravi Urs