ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to Delete Format Menu Toolbar From Excel (https://www.excelbanter.com/excel-programming/438629-how-delete-format-menu-toolbar-excel.html)

vicky

how to Delete Format Menu Toolbar From Excel
 
I need a code thru which i need to remove Format Toolbar . i.e the
user shuld not be able to have access to Format toolbar ...

Ron de Bruin

how to Delete Format Menu Toolbar From Excel
 
Hi vicky

See
http://www.rondebruin.nl/menuid.htm

You can use this for the Format menu in the menu bar for example
Application.CommandBars("Worksheet Menu Bar").FindControl(ID:=30006).Enabled = False



--

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


"vicky" wrote in message ...
I need a code thru which i need to remove Format Toolbar . i.e the
user shuld not be able to have access to Format toolbar ...


Peter T

how to Delete Format Menu Toolbar From Excel
 
Sub BarVis(bVis As Boolean)

Application.CommandBars("Formatting").Visible = bVis

End Sub

Regards,
Peter T


"vicky" wrote in message
...
I need a code thru which i need to remove Format Toolbar . i.e the
user shuld not be able to have access to Format toolbar ...




vicky

how to Delete Format Menu Toolbar From Excel
 
thanks a lot . i just need to de - activate the sheet option in format
menu bar . this line de-activates whole format menu bar
Application.CommandBars.FindControl(ID:=30026).Ena bled = True

Ron de Bruin

how to Delete Format Menu Toolbar From Excel
 
Try

Sub Enabled_False()
Dim Ctl As CommandBarControl

On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl(ID:=30006).Con trols
Ctl.Enabled = False
Next Ctl
Application.CommandBars.FindControl(ID:=30026).Ena bled = True
On Error GoTo 0
End Sub


Sub Enabled_True()
Dim Ctl As CommandBarControl

On Error Resume Next
For Each Ctl In Application.CommandBars.FindControl(ID:=30006).Con trols
Ctl.Enabled = True
Next Ctl
On Error GoTo 0
End Sub




--

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


"vicky" wrote in message ...
thanks a lot . i just need to de - activate the sheet option in format
menu bar . this line de-activates whole format menu bar
Application.CommandBars.FindControl(ID:=30026).Ena bled = True



All times are GMT +1. The time now is 06:35 AM.

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