ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting menu (xla) (https://www.excelbanter.com/excel-programming/336953-deleting-menu-xla.html)

Ravi

Deleting menu (xla)
 
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

Ron de Bruin

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




Ravi

Deleting menu (xla)
 
thanks.

"Ron de Bruin" wrote:

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






All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com