Excel command button works on my computer, but not others

hmwest43

New Member
Joined
Jun 10, 2019
Messages
5
I have a command button in my workbook, which is used to resent a column of values back to zero. The button works on both me and my husband's computers (we both have office 365, fully up to date) and also works on my intern's computer (older - office 2010).

However, it does not work on my boss's computer (office 365, fully up to date). When clicked, absolutely nothing happens. I have checked the following already:
- the file is not read-only.
- the button's code reads the same as on my computer
- macros protection settings are the same as on my computer
- the workbook is saved as macros-enabled
- he is not in design mode

Can anyone think of why this would not work on his computer, but on all others? :confused::confused:

Thanks,
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to the Board!

Here are a few things to try:

1. Open the file on their computer, go to the VB Edtior, and form the "Debug" menu, select "Compile VBAProject". Does it find any errors?

2. Try placing a Message Box at the beginning of your code, like this:
Code:
MsgBox "Code is running!"
and try clicking the button again. Does that message box pop-up?

If not, then your code is not actually running. Double-check again that Macros/VBA are enabled on that computer.

Also, check to make sure that your command button is not an ActiveX control, that needs an ActiveX library selected on that computer
(Go to your computer, go to VB Editor, and under the "Tools" menu, check to see which References are selected. Check the same on the other computer and see if they match).

3. If you do get the Msgbox to appear, then stop the code again, put a break point at that message box, then click the button, and when that message appears, go into the VB Editor, and press the F8 key repeatedly to advance the code one line at a time, and see where the code appears to be quitting/failing.
 
Upvote 0
If it's a Forms button have you checked the correct macro is assigned to the button?

If it's ActiveX what happens when you right click it and select View Code...?
 
Upvote 0
Couple Ideas:

Command button called code in Personal' macros not the workbook, so the codes not there
Open the workbook on a different PC and see if you can see the code

Security settings on the other PC, macros allowed etc

Saved as: Macro-enabled workbook

Any resent updates on the other PC

Regards
jiuk
 
Upvote 0
Thank you - for #1 , it did not find any errors. I used the "f8" method to step through the code, and it worked fine. (On my computer, when you click the reset button, a message appears and says "are you sure?" before actually clearing). This all popped up great. But again when clicking on it, it doesn't do anything.

I checked ActiveX and all references are the same on our computers.

Our computers have the same ActiveX and Macros protection settings as well.

We've also tried restarting the computer and reinstalling office 365 with no luck. Since then we've opened the file on two other computers where it works find. We're stumped!!
 
Upvote 0
we checked to make sure the code appears correctly on the other computer... it does. Went through all other suggestions as well. We're clueless!
 
Upvote 0
Have you checked to see if the code is actually running?

You could do that by setting a breakpoint on the first line of the code with F9 and then clicking the button.

Also, check to see if Design Mode is active or not.
 
Upvote 0
What happened when you tried my 2nd suggestion?
 
Upvote 0
What happens if you replace the ActiveX button, with a shape, or a Forms Control button & assign the macro to it?
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,031
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top