Evan West
Evan West

Reputation: 53

VBA Form Control Button Needs to Disappear After Another Button is Clicked

So I have a Form Control Button NOT and ActiveX Command Button that I want to make disappear when another button is clicked. Normally if it was a ActiveX Command Button i would use:

ButtonName.Visible = False

in the code that was triggered by the other button. However I dont know how to get that work with a Form Control Button as they dont have name like a ActiveX Command Button does so far as I know?

I would just change the button I want to disappear to a ActiveX Command Button but when I do that I have issues with the buttons format changing, text sizes up when they are clicked, buttons change size when clicked, etc.


Upvotes: 0

Views: 1169

Answers (2)

Harun24hr
Harun24hr

Reputation: 36780

You may also try

Sub Button2_Click()
    Sheets("Sheet1").Buttons("Button 1").Visible = False
End Sub

Upvotes: 3

Nathan_Sav
Nathan_Sav

Reputation: 8531

.Shapes("button 1").Visible = False

Upvotes: 1

Related Questions