Link to home
Create AccountLog in
Avatar of Frank Freese
Frank FreeseFlag for United States of America

asked on

Hiding a command button

Folks,
I have many command buttons whose Visible property is set to False. However, I have 1 particular command button whose Visible property is set to False yet it remains visible?
I have a command button related to the first command button with the following code:
Private Sub MultipleIf_Click()
   Home57.Visible = False
   Sheets("Multiple Ifs").Activate
   Sheets("Multiple Ifs").MultipleIfs.Select
End Sub

Open in new window


The object remains visible?

The location of the first command button is A57 and C57 for the second. File attached - s/b Function and Formulas for Excel Revised3.xlsm. If not please advise
Function-and-Formulas-for-Excel-.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Frank Freese

ASKER

I thought I had all those identfied but missed one.
By the way, you taught me quite a bit here and thinking I would need more help on the Main tab I think I figured out the next step I want to do. You've been awesome here and again, many thanks
Simply fantastic
You're welcome and once again I'm glad I was able to help. BTW I found out what was wrong by putting a breakpoint on the line that hides Home57 and then checked its visibility, and when VBA said it was hidden I knew there were only two possibilities. One, that there was more than one control by the same name (the other one would have to be on a different sheet) and two, that there were two controls in the same place.

Select the 'About Me' tab in my profile and you'll find an article on debugging among the other articles I've written. Ignore the fact that it cites VB6 since most of it applies to VBA.
Marty - MVP 2009 to 2013
I've already check the About Me and saw the Spell Check a Textbox link.
It is also good to see some at my age bracket activity involved in helping others.
I'm sure I'll be back