View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default controls in excel

activesheet.oleobjects("CommandButton1").enabled=f alse


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"stinson" wrote in message
...
I have been using VB in excel to create user forms. I then have a "button"
that calls the sub "runform1" and the form opens to use. I thought I
would
try controls right in the spreadsheet in place of the userform. I did
this
using the controls toolbox toolbar. The controls worked fine with one
exception. I cannot enable or disable control buttons as I could with the
user form. Typially I like to enable or disable control buttons depending
on
what the user is doing at that time.

Any suggestions? Can control buttons be enabled and disabled using
controls
right in the spreadsheet?

Thank you,
Tom