ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Remove Command Button After Click (https://www.excelbanter.com/excel-discussion-misc-queries/226255-remove-command-button-after-click.html)

andiam24

Remove Command Button After Click
 
Good Morning,
I would like for the command button, after it has performed the function, to
automatically disappear from the worksheet. Is this possible?

Don Guillett

Remove Command Button After Click
 
Private Sub CommandButton1_Click()
MsgBox "hi"
ActiveSheet.Shapes("CommandButton1").Cut
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Good Morning,
I would like for the command button, after it has performed the function,
to
automatically disappear from the worksheet. Is this possible?



andiam24

Remove Command Button After Click
 
Thanks Don!

"Don Guillett" wrote:

Private Sub CommandButton1_Click()
MsgBox "hi"
ActiveSheet.Shapes("CommandButton1").Cut
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Good Morning,
I would like for the command button, after it has performed the function,
to
automatically disappear from the worksheet. Is this possible?




Don Guillett

Remove Command Button After Click
 
Glad to help. I never use command buttons. I prefer shapes.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Thanks Don!

"Don Guillett" wrote:

Private Sub CommandButton1_Click()
MsgBox "hi"
ActiveSheet.Shapes("CommandButton1").Cut
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Good Morning,
I would like for the command button, after it has performed the
function,
to
automatically disappear from the worksheet. Is this possible?





andiam24

Remove Command Button After Click
 
I have just one more problem:
The user worksheet I created has columns that will remain unused if the
checkbox value= false. I would like to have the button (shape) also
hide/delete these columns. Are the checkboxes necessary- I only deemed them
necessary because some of the columns have formulas so I can't just use
value=blank to hide columns.
Thanks in advance for your brain!

"Don Guillett" wrote:

Glad to help. I never use command buttons. I prefer shapes.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Thanks Don!

"Don Guillett" wrote:

Private Sub CommandButton1_Click()
MsgBox "hi"
ActiveSheet.Shapes("CommandButton1").Cut
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"andiam24" wrote in message
...
Good Morning,
I would like for the command button, after it has performed the
function,
to
automatically disappear from the worksheet. Is this possible?






All times are GMT +1. The time now is 08:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com