Hiding a command button

Frank Freese
Frank Freese used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Older than dirt
Most Valuable Expert 2017
Distinguished Expert 2018
Commented:
You have two buttons in the same place. If you drag Home57 a bit to the right you'll see Home14A behind it and it's that button that is remaining visible when Home57 is hidden.

Author

Commented:
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

Author

Commented:
Simply fantastic
Martin LissOlder than dirt
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
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

Author

Commented:
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

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial