Cannot assign macro to button

SPS41

New Member
Joined
Feb 21, 2023
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I have an excel workbook called Bill of Materials (BOM), which contains a lot of macros and I have always had buttons call certain macros. My BOM excel sheet basically uses power query to organize data sourced from a workbook called Masterlist and throws it on a new sheet (on the BOM workbook). Then a v lookup copies relevant data from that new sheet on my active worksheet (again on the BOM wb).
But my issue starts here. My BOM workbook worked fine until I moved my Master list excel sheet to one drive, it’s like I broke the whole BOM workbook. My macro works but the button will not execute the macro no matter how many times I assign the macro to it or how many new buttons I create and try to assign the same macro.
I know there are some issues with excel and one drive but I don’t know if that’s what broke the sheet?
All the macros work fine, I just cannot add it to a button.
Let me know if you need more info. I can attach prices of relevant code but I don’t know if that will help. I can if need be.
Thanks in advance for all your help!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
What happens if you try to attach a macro to a button? Are the macros inside the BOM workbook or in some other Excel workbook?
 
Upvote 0
What happens if you try to attach a macro to a button? Are the macros inside the BOM workbook or in some other Excel workbook?
Hi, thanks for replying so quick! When I try to assign a macro and click ok, it’s closes out the dialog box with no errors and all the macros and data are all in the same workbook. The source to the power query editor is the only external piece of data.
 
Upvote 0
Hi, thanks for replying so quick! When I try to assign a macro and click ok, it’s closes out the dialog box with no errors and all the macros and data are all in the same workbook. The source to the power query editor is the only external piece of data.
Quick update, as I was checking my excel document, now all the buttons don’t work. It’s like they don’t like macros or something. I’ve never seen this happen before
 
Upvote 0
My BOM workbook worked fine until I moved my Master list excel sheet to one drive
Where exactly are you trying to run them from?
They will not work when running Excel from the Web, only when running from the Desktop App of Excel.
 
Upvote 0
Where exactly are you trying to run them from?
They will not work when running Excel from the Web, only when running from the Desktop App of Excel.
All the excel files are stored on the server. All on the desktop app. I’m not using excel on the web.
 
Upvote 0
What happens if you try to assign a macro to a shape, like a rectangle?
I tried assigning to a forms control button (which is a shape right?) I also tried to a regular shape. I right click the shape/button, assign macro, select desired macro, under the drop down that says macros in: I select the name of my current workbook. And click ok. The dialog box closes as if it’s all good. But when I click the shape/button nothing happens.
 
Upvote 0

Forum statistics

Threads
1,223,937
Messages
6,175,512
Members
452,650
Latest member
Tinfish

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