controls in excel

G

Guest

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
 
B

Bob Phillips

activesheet.oleobjects("CommandButton1").enabled=false


--
HTH

Bob

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

Guest

Bob,

I tried the code that you suggested and get a run time error, unable to get
the OLEObjects property of the worksheet class. I think the code is pretty
much what I need, just some small aspect isn't right. I haven't had time to
try to figure out what's wrong. I will try the excel help and see what I can
figure out tonight.

Thanks again,
Tom
 
B

Bob Phillips

Maybe its forms buttons

activesheet.buttons("Button 1").enabled=false


--
HTH

Bob

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

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