View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Shetty Shetty is offline
external usenet poster
 
Posts: 78
Default How to disable hide/unhise command by user?

I have tried to use this code in the window activate and deactivate
events.
It gives error that the "object variable or with block variable not
set."
and halts at the line Set myControls = CommandBars.FindControls _
(Type:=msoControlButton, id:=id)
When I hold the mouse over the mycontrols, a yellow pop up shows
mycontrols=nothing.
It was working perfectly fine if used as a saperate macro. But that
causes problem when user uses any other workbook where all the
commands should be available.

Any idea?
Regards,
Shetty.




SOS wrote in message ...
Loomah,

Excellent piece of code - very useful. However I too found that ID nos
293 and 294 work for enabling and disabling "delete row" and "delete
column" but 296 and 297 did not work for enabling and disabling "insert
row" and "insert column" despite finding the site below and seeing that
ID nos 296 and 297 are mentioned

http://support.microsoft.com/default...b;EN-US;213552

Any thoughts?

Regards

Seamus


---
Message posted from http://www.ExcelForum.com/