Disable Command Button

R

Raj

I have inserted two buttons CMD1 and CMD 2. On opening the workbook, I should
have the cmd 1 enabled and cmd2 disabled.

How to do it?
 
M

mudraker

Raj

2 ways

Right click on button > select properties > Select Enable and change to
flase


From within a macro

Private Sub CommandButton1_Click()
CommandButton2.Enabled = False
Your Code Here
End Sub
 

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

Top