View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Moody Moody is offline
external usenet poster
 
Posts: 3
Default Array with Findcontrol

sorry forgot to add my code:
With Application.CommandBars("Worksheet Menu Bar")
.FindControl(ID:=30003).Enabled = False
.FindControl(ID:=30004).Enabled = False
.FindControl(ID:=30005).Enabled = False
.FindControl(ID:=30006).Enabled = False
.FindControl(ID:=30007).Enabled = False
.FindControl(ID:=30011).Enabled = False
.FindControl(ID:=30009).Enabled = False
.FindControl(ID:=3, Recursive:=True).Enabled = False
.FindControl(ID:=748, Recursive:=True).Enabled = False
.FindControl(ID:=3823, Recursive:=True).Enabled = False
.FindControl(ID:=846, Recursive:=True).Enabled = False
End With


Hi,
I have used the following code to disable all menu bar items except File and
Help. Is there a simpler way of writing this code. My code works but I am
just curious.

Any help is appreciated.

Regards
Moody