![]() |
controls in excel
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 |
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 |
controls in excel
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 "Bob Phillips" wrote: 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 |
controls in excel
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) "stinson" wrote in message ... 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 "Bob Phillips" wrote: 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 |
All times are GMT +1. The time now is 02:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com