Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    NJ, USA
    Posts
    239
    Thanks
    2
    Thanked 1 Time in 1 Post

    Enable/Disable a CommandButton

    I have a CommandButton on a worksheet (created from the Control Toolbox). I want to programmatically enable/disable the button. I tried the following:

    Activesheet.Shapes("cmdButton").Enabled = True

    but I get an error message: "Object doesn't support this property or method". I think I need another property between the Shapes and the Enabled (?).

    Suggestions gratefully received.

  2. #2
    calacuccia
    Guest

    Re: Enable/Disable a CommandButton

    Hi Colin,

    Try this:

    ActiveSheet.Shapes("CmdButton").OLEFormat.Object.E nabled = False

  3. #3
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    NJ, USA
    Posts
    239
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Enable/Disable a CommandButton

    Excellent. Many thanks.

Posting Permissions

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