Command Button Created from Forms Menu Question
Thanks so much for your response. I discovered, by hit and miss, a slightly
different approach, which I would like to share with anyone else wishing to
hide a button created from the Forms Menu:
Run the code code below until the button you want is selected:
WorkSheets(1).Shapes.Items(i).select
Where i = a number starting with 1
That provides the item # to identify the button. Then run the code below to
make the button invisible:
WorkSheets(1).Shapes.Items(#).Visible=msoFalse
Where # is the number of the item you discovered
You probably can use this code with the ActiveSheet member as opposed to the
WorkSheet class, but I haven't test it.
"Muhammed Rafeek M" wrote:
use this commend:
ActiveSheet.Shapes("Button 1").Visible = False
or
ActiveSheet.Shapes(1).Visible = False
"JR_06062005" wrote:
I've created a spreadsheet that has several views with several buttons (to do
various things) which I created using the Forms Menu Bar. One thing I would
like to be able to do is make some of the buttons invisible for certain
views. If anyone knows how I can do this, I would certainly appreciate the
help.
|