Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Western NY, USA
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Buttons on spreadsheet (not form) (Excel 2003 SP2)

    I want to change the properties of a button on a spreadsheet when clicked. Specifically I want to change the text. I may also change the background color. Excel's help us useless regarding buttons on spreadsheets.

    I have tried the Shapes collection, but a shape does not have as text or caption property.

    Thanks.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Buttons on spreadsheet (not form) (Excel 2003 SP2)

    Is this a command button from the Control Toolbox? Or from the Forms toolbar?

  3. #3
    2 Star Lounger
    Join Date
    Mar 2002
    Location
    Western NY, USA
    Posts
    157
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Buttons on spreadsheet (not form) (Excel 2003 SP2)

    I was using a form command button. I was unaware of the control command button. In a couple of minutes I figured it out. Thanks.

    Is there a discussion regarding the differences between the two and when to use which? It appears to me that a form command button dropped on a worksheet is a workbook level object, but a control command button is a sheet level object. Is this correct.

    Thaks for the quick response.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Buttons on spreadsheet (not form) (Excel 2003 SP2)

    See for example Excel Controls from the Toolbox Toobar and the Forms Toolbar, Which Control Type to Use and (slightly outdated) Excel Developer Tip: Using Controls on Worksheets.

    Both types are worksheet-level shapes, but only those from the Control Toolbox are shown when you type Me. in the worksheet module.

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Buttons on spreadsheet (not form) (Excel 2003 SP2)

    There is quite a good explanation here. Generally the Control Toolbox controls are more powerful/flexible, but in my experience are also more likely to go wrong. Forms controls are worksheet-level objects - commandbuttons for example belong to the sheet's buttons collection.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •