how to disable/enable command button(ActiveX) using macro

E

enahs_naneek

I have tried to create a macro using recorder to disable/enable command
button (ActiveX) with the following code being created

ActiveSheet.Shapes("CommandButton1").Select

This only results in the command button being selected - with the procedure
of enabling/disabling being "lost". So i tried the following code

ActiveSheet.CommandButton1.Select
CommandButton1.Enabled = False

This presents runtime error message "object required"

What is the "simplest" way to create this macro? (first time user)

Any help much appreciated
 
S

Stefi

ActiveSheet.CommandButton1.Enabled = False

--
Regards!
Stefi



„enahs_naneek†ezt írta:
 

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