Share via

Command Button Properties window caption property cannot be set

Anonymous
2022-01-19T13:40:09+00:00

While dealing with Command Button (activeX Control) in Excel, I am trying to set caption property and no matter what key I press on the keyboard then the focus is switched into the worksheet properties.
Is it possible to fix it?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2022-01-19T15:53:04+00:00

Hello Witold,

You can change the caption in code, ie if you open the IDE and you select the object to code an event, then use for example

commandButton1.caption="Do this".

this should be able to change the caption.

Addressing the other issue of focus being switched to worksheet properties. I would suggest closing all open worksheets because you could be experiencing an out of memory exception. Do this and let me know how it goes.

Kind regards.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-02-02T13:01:51+00:00

    Hello Pakrashio,

    Thanks for your advice. I followed your hint and it worked of course so thanks a lot.
    However, I do not know why it is happening and I think that it is an Office error.

    Kind Regards,
    Witold

    Was this answer helpful?

    0 comments No comments