PC Review


Reply
Thread Tools Rate Thread

controls in excel

 
 
=?Utf-8?B?c3RpbnNvbg==?=
Guest
Posts: n/a
 
      16th Jun 2007
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


 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      16th Jun 2007
activesheet.oleobjects("CommandButton1").enabled=false


--
HTH

Bob

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

"stinson" <(E-Mail Removed)> wrote in message
news:37E35C70-C4D4-455B-A7CA-(E-Mail Removed)...
>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
>
>



 
Reply With Quote
 
=?Utf-8?B?c3RpbnNvbg==?=
Guest
Posts: n/a
 
      18th Jun 2007
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=false
>
>
> --
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
> "stinson" <(E-Mail Removed)> wrote in message
> news:37E35C70-C4D4-455B-A7CA-(E-Mail Removed)...
> >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
> >
> >

>
>
>

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      19th Jun 2007
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" <(E-Mail Removed)> wrote in message
news:4B16079C-C84F-4D00-A4A4-(E-Mail Removed)...
> 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=false
>>
>>
>> --
>> HTH
>>
>> Bob
>>
>> (there's no email, no snail mail, but somewhere should be gmail in my
>> addy)
>>
>> "stinson" <(E-Mail Removed)> wrote in message
>> news:37E35C70-C4D4-455B-A7CA-(E-Mail Removed)...
>> >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
>> >
>> >

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel controls vs vba controls cmpcwil2 Microsoft Excel Programming 3 19th Apr 2006 03:33 PM
Message box breaks owner draw controls in .NET controls used as ActiveX controls (again) Clive Dixon Microsoft Dot NET Framework Forms 0 26th May 2004 10:15 AM
Excel OCX/ActiveX Visual Controls for creating a Excel Dashboard/Scorecard Belinda Microsoft Excel Discussion 1 30th Jan 2004 03:54 PM
Excel OCX/ActiveX Visual Controls for creating a Excel Dashboard/Scorecard Belinda Microsoft Excel Programming 0 30th Jan 2004 12:40 PM
Excel OCX/ActiveX Visual Controls for creating a Excel Dashboard/Scorecard Belinda Microsoft Excel Misc 0 30th Jan 2004 12:40 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:07 AM.