If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
make command button invisible
Could someone please tell me the syntax to make a command
button visible or invisible? I was hoping it would be something easy like: commandbutton.visible = false but that isn't working. thanks for any help |
#2
|
|||
|
|||
make command button invisible
I just recorded this
Sub Macro7() ' ' Macro7 Macro ' Macro recorded 6/29/2004 by Don Guillett ' ' Application.CommandBars("Control Toolbox").Visible = True ActiveSheet.Shapes("CommandButton1").Select Range("J15").Select Application.CommandBars("Control Toolbox").Visible = False End Sub Seems like a lot of bother. Why not use a button from forms toolbar or a shape from drawing. Easier. Sub hideshape() ActiveSheet.Shapes("rectangle 4").Visible = False End Sub -- Don Guillett SalesAid Software "Excel-VBA Dummy" wrote in message ... Could someone please tell me the syntax to make a command button visible or invisible? I was hoping it would be something easy like: commandbutton.visible = false but that isn't working. thanks for any help |
#3
|
|||
|
|||
make command button invisible
If you use a command button from the "control toolbox " instead of the
"forms toolbar", you can set the visible property. Commandbutton1.visible = False or Commandbutton1.visible = True HTH Ken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004 |
#4
|
|||
|
|||
make command button invisible
Thank you. This helped alot. I press the command button,
run a macro to make it invisible, copy the current spreadsheet to another location, and then make the button visible again. The only thing that isn't working now - the button doesn't become visible again, unless I close and re-open the spreadsheet. Do you know how I can fix this? -----Original Message----- If you use a command button from the "control toolbox " instead of the "forms toolbar", you can set the visible property. Commandbutton1.visible = False or Commandbutton1.visible = True HTH Ken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004 . |
#5
|
|||
|
|||
make command button invisible
Hi
I am not sure exactly what you are trying to do, but try something like ThisWorkbook.Sheets("sheet1").CommandButton1.Visib le = False ThisWorkbook.Sheets("sheet2").Copy ThisWorkbook.Activate ThisWorkbook.Sheets("sheet1").CommandButton1.Visib le = True HTH Ken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004 |
#6
|
|||
|
|||
make command button invisible
Thank you Ken. This got it working.
-----Original Message----- Hi I am not sure exactly what you are trying to do, but try something like ThisWorkbook.Sheets("sheet1").CommandButton1.Visi ble = False ThisWorkbook.Sheets("sheet2").Copy ThisWorkbook.Activate ThisWorkbook.Sheets("sheet1").CommandButton1.Visi ble = True HTH Ken --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.711 / Virus Database: 467 - Release Date: 25/06/2004 . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
MAKE EASY MOENY | Rajkovaca Ante | Worksheet Functions | 0 | January 2nd, 2004 09:51 PM |