Yes, in your case I mean sheet. Something like
Private Sub Worksheet_Activate()
Application.CommandBars("Formatting").Controls("my Button").Enabled =
True
End Sub
Private Sub Worksheet_Deactivate()
Application.CommandBars("Formatting").Controls("my Button").Enabled =
False
End Sub
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
"avveerkar" wrote in
message ...
Bob Phillips Wrote:
You could add code to your workbook to show that button when that
workbook
is activated or opened, hide it when deactivated or closed.
--
HTH
Bob Phillips
Dear Bob,
Can you clarify? I code my workbook ( you mean worksheet ) to show
button when it is activated - how does that help? Sorry, I am missing
the point. As I select the sheet, my code will display the button where
I want it but how do I lock it in that position? It will still move up
when I scroll the sheet. Are you suggesting that I should deactivate
the sheet and activate it again so that the button is re-displayed (
by, let us say, selecting other sheet and then coming back to this
sheet )? I still don't understand how this will help.
I appreciate your spending time on this.
A V Veerkar
--
avveerkar
------------------------------------------------------------------------
avveerkar's Profile:
http://www.excelforum.com/member.php...o&userid=30338
View this thread: http://www.excelforum.com/showthread...hreadid=500050