I might suggest that a far simpler way to go is to just check whether the
right sheet is active after the user clicks the button. To make a button
visible or not dynamically from an add-in you have to raise the bar quite a
bit in terms of complexity. But it's well worth learning about this area if
you really want to advance your developer skills.
http://support.microsoft.com/kb/213566
http://www.cpearson.com/excel/AppEvent.aspx
--
Jim
"Madiya" <(E-Mail Removed)> wrote in message
news:0b0c76a6-abdd-45cb-949a-(E-Mail Removed)...
| Hi Jim,
| Thanks for help. Perfact.
| Another small problem. I am putting this macros in an addin.
| I want to show custom button only if sheet name is "ALVXXL01".
| If any other sheet is activated or any other file with different sheet
| name is activated/opened then this control will be deleted.
| If any file having same sheet name is activated then the control will
| be shown up.
|
| Will you pl advise, how shall I proceed?
|
| Thanks again.
| Regards,
| Madiya.