0

I have a workbook with several command buttons that used to retrieve data, from other sheets, hide and show worksheets and command buttons.

All of a sudden, several, but not all of the buttons wont click. If I step through the code using F8 in the VB window, if the code is to unhide and activate a sheet, the code is taking me to a different sheet.

Is this a known bug? I haven't supplied the code as I know the code works fine

Any help appreciated

braX
  • 11,506
  • 5
  • 20
  • 33
Damian M
  • 47
  • 10
  • Please check if your button is assigned to a macro properly ([Assign a macro to a Form or a Control button](https://support.office.com/en-us/article/assign-a-macro-to-a-form-or-a-control-button-d58edd7d-cb04-4964-bead-9c72c843a283)). If it is assigned properly please put a break point in the first line of your macro to check if the button calls the macro. If it does provide the code or a [mcve]. – Pᴇʜ Nov 29 '18 at 07:58

1 Answers1

1

Ok, So for some buttons I replaced and this worked, then I noticed in design mode if I just move the buttons to a different location on the same page, exit design mode, then remove back to where I want them to be, all is fine and they work as intended.

Very strange

Damian M
  • 47
  • 10
  • If you are really using ActiveX controls I recommend to switch over to the normal Form Controls of Excel. ActiveX controls are known to produce a lot of odd bugs. See [What is the difference between “Form Controls” and “ActiveX Control”?](https://stackoverflow.com/questions/15455179/what-is-the-difference-between-form-controls-and-activex-control-in-excel-20) and [Overview of differences between Form Controls and ActiveX Controls in Excel](https://stackoverflow.com/a/50144021/8112776) – Pᴇʜ Nov 29 '18 at 08:01
  • I have a similar problem. Command button on the sheet works fine. Then I shift the button to other locations and it stops working. No idea why – gavin Dec 21 '21 at 06:37