ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Command Button Disappears?? (https://www.excelbanter.com/excel-discussion-misc-queries/100123-command-button-disappears.html)

TrevorC

Command Button Disappears??
 
I have a command button in place to clear certain cells when it is pressed.
Everytime it is pressed the button disappears and won't come back. How do I
keep the button active and visible after it is pressed?
Thanks,
Trevor

Dave Peterson

Command Button Disappears??
 
Make sure your zoom is set to 100%.

And you may find that the buttons from the Forms toolbar behave nicer. (Yep,
they have a lot fewer features, too.)

TrevorC wrote:

I have a command button in place to clear certain cells when it is pressed.
Everytime it is pressed the button disappears and won't come back. How do I
keep the button active and visible after it is pressed?
Thanks,
Trevor


--

Dave Peterson

TrevorC

Command Button Disappears??
 
Thank for the response. The button was created through the Control Toolbox
and Visual Basic. Once the macro is activated the button disappears and you
have to close the sheet and reopen to reset it. The code I have is as
follows:

Private Sub CommandButton1_Click()
CommandButton1.Visible = False
Worksheets("Sheet1").Range("G60").ClearContents

End Sub

Is it possible to get the button to stay?

"Dave Peterson" wrote:

Make sure your zoom is set to 100%.

And you may find that the buttons from the Forms toolbar behave nicer. (Yep,
they have a lot fewer features, too.)

TrevorC wrote:

I have a command button in place to clear certain cells when it is pressed.
Everytime it is pressed the button disappears and won't come back. How do I
keep the button active and visible after it is pressed?
Thanks,
Trevor


--

Dave Peterson


Dave Peterson

Command Button Disappears??
 
Remove the .visible line from the code????

That line hides the button.

===
There have been other posts where the button disappears for no apparent
reason--not like your case. I assumed that your problem was like those other
posts. Sorry.

TrevorC wrote:

Thank for the response. The button was created through the Control Toolbox
and Visual Basic. Once the macro is activated the button disappears and you
have to close the sheet and reopen to reset it. The code I have is as
follows:

Private Sub CommandButton1_Click()
CommandButton1.Visible = False
Worksheets("Sheet1").Range("G60").ClearContents

End Sub

Is it possible to get the button to stay?

"Dave Peterson" wrote:

Make sure your zoom is set to 100%.

And you may find that the buttons from the Forms toolbar behave nicer. (Yep,
they have a lot fewer features, too.)

TrevorC wrote:

I have a command button in place to clear certain cells when it is pressed.
Everytime it is pressed the button disappears and won't come back. How do I
keep the button active and visible after it is pressed?
Thanks,
Trevor


--

Dave Peterson


--

Dave Peterson

TrevorC

Command Button Disappears??
 
Perfect!! Worked just like I wanted. Figures something so simple caused me
all this trouble.
Thanks!!

"Dave Peterson" wrote:

Remove the .visible line from the code????

That line hides the button.

===
There have been other posts where the button disappears for no apparent
reason--not like your case. I assumed that your problem was like those other
posts. Sorry.

TrevorC wrote:

Thank for the response. The button was created through the Control Toolbox
and Visual Basic. Once the macro is activated the button disappears and you
have to close the sheet and reopen to reset it. The code I have is as
follows:

Private Sub CommandButton1_Click()
CommandButton1.Visible = False
Worksheets("Sheet1").Range("G60").ClearContents

End Sub

Is it possible to get the button to stay?

"Dave Peterson" wrote:

Make sure your zoom is set to 100%.

And you may find that the buttons from the Forms toolbar behave nicer. (Yep,
they have a lot fewer features, too.)

TrevorC wrote:

I have a command button in place to clear certain cells when it is pressed.
Everytime it is pressed the button disappears and won't come back. How do I
keep the button active and visible after it is pressed?
Thanks,
Trevor

--

Dave Peterson


--

Dave Peterson



All times are GMT +1. The time now is 04:27 AM.

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