Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Command Button Created from Forms Menu Question

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Command Button Created from Forms Menu Question

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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Forms Command Button - Removal JMay Excel Discussion (Misc queries) 8 January 4th 07 06:33 PM
Command button on forms Erik (AP Inc.) Excel Discussion (Misc queries) 2 August 28th 06 01:58 PM
Code created in a Macro not working for a Command Button Amber_D_Laws[_8_] Excel Programming 15 January 13th 06 10:35 PM
Forms menu button question David Excel Programming 3 November 24th 05 04:04 PM
How do I assign a macro I have created to a Command Button in Exc. Andrew7675 Excel Discussion (Misc queries) 1 March 3rd 05 08:08 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"