Command Button Disappears??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.)
 
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?
 
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.
 
Perfect!! Worked just like I wanted. Figures something so simple caused me
all this trouble.
Thanks!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top