View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Disable the name box

What do you mean by 'disable'? If you protect the worksheet (Tools,
Protection) the names can be viewed and selected, but not changed,
from the 'name box'. If you make the names hidden they do not appear
in the 'name box' nor the 'Define Name' dialog (Insert, Name, Define).
You must set the Visible property in code e.g. in the VBE Immediate
Window:

for each n in ThisWorkbook.Names : n.visible = false : next

The above code is also a heads up: the user can access (view, make
visible, change, delete) your defined names using the Immediate
Window, even when the worksheet and workbook is protected.

"markedwardfriedman" wrote in message ...
The name box is on the formula bar and I want to disable
it in a macro