Macros not working

angel34

Board Regular
Joined
Jun 3, 2016
Messages
79
I migrated last week from a computer running Office 2007 on Windows 7 to a new computer running Office Professional 2010 plus on Windows 10. I am facing a weird problem since then. None of my macros seem to work on my new computer. My macros are all proven and have worked flawlessly for years.

I tried he following in order to solve the problem with no luck.

1. Enabled macros from Macro Security-->Macro Settings-->Disable all macros with notification so that they can be enabled when the workbook opens.

2. To rule out incompatibility issues, I have saved all workbooks containing macros in .xlsm format in Office 2010.

3. Macros created are all workbook specific hence stored in the respective workbooks and not in a Personal Macro Workbook). Hence, I guess, I could not find a .xlsb file in the XLStart folder (C/Users/Username/AppData/Roaming/Microsoft/Excel/XLStart). I thought of copying it in the XLStart folder of my new computer.

I do not know of any other measure that I could take at this moment so that the macros start working again.

I am at my wits end what to do about this problem further and is completely clueless about how to recover my macros since they are quite large in number and I do not have the time to recreate them. I shall be extremely thankful if somebody kindly guide me figure out the solution.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
1. Enabled macros from Macro Security-->Macro Settings-->Disable all macros with notification so that they can be enabled when the workbook opens.
With this option, Macros are NOT automatically enabled. When you open the file, they will still be disabled, but you should receive a notification that you can click to enable them.
Do you see this notification?
Are you acting on it and then enabling the Macro?

Another option is to make the folder containing the Macros a Trusted Location.
See here for details: Trusted Locations and Excel Macros - dummies
 
Upvote 0
What exactly do you mean when you say they don't work? Do they error? Will they not run? If they don't run, how are you trying to run them and what, if anything, happens when you try?
 
Upvote 0
Thank you for choosing to reply to my query. When I click on the run button, nothing happens i.e. there are no changes in the work book. No error alert is thrown. The workbook remains as it were before running the macro.
 
Upvote 0
With this option, Macros are NOT automatically enabled. When you open the file, they will still be disabled, but you should receive a notification that you can click to enable them.
Do you see this notification?
Are you acting on it and then enabling the Macro?

Another option is to make the folder containing the Macros a Trusted Location.
See here for details: Trusted Locations and Excel Macros - dummies
Yes Sir. I disabled macros with notification in the Trust Centre as a security measure. I continue to receive a notification when I open the workbook and click to enable it.
 
Upvote 0
Thank you for choosing to reply to my query. When I click on the run button, nothing happens i.e. there are no changes in the work book. No error alert is thrown. The workbook remains as it were before running the macro.
Try placing a Message Box statement at the very beginning of your code, something like this:
VBA Code:
MsgBox "Macro is running"

Then try clicking the button.
If you see that Message Box pop-up, it tells you that the Macro is indeed being called and running successfully (it probably just isn't doing what you expect).
If you do not get that Message Box, then it tells us that the Macro is not being called (i.e. maybe the code is not actually mapped to the button, etc).
 
Upvote 0
Try placing a Message Box statement at the very beginning of your code, something like this:
VBA Code:
MsgBox "Macro is running"

Then try clicking the button.
If you see that Message Box pop-up, it tells you that the Macro is indeed being called and running successfully (it probably just isn't doing what you expect).
If you do not get that Message Box, then it tells us that the Macro is not being called (i.e. maybe the code is not actually mapped to the button, etc).
Yes. "Macro is running" message box pops up while the rest of the code doesn't work. I guess there is a difference this time. This code has been typed in the vba window while the rest of the code has been copied from another computer, although I am not sure whether this makes any difference. I am running the code from Developer--->Macros-->Run button so the issue of not mapping the code to the button should not arise.
 
Upvote 0
I think we probably need to see the code then.
It may not be working quite the way you think or expect, possibly because it might not be referencing workbooks or worksheets correctly.
 
Upvote 0
I think we probably need to see the code then.
It may not be working quite the way you think or expect, possibly because it might not be referencing workbooks or worksheets correctly.
The codes I use are proven and worked successfully for years in my old computer running Office 2007. I checked performance of the codes again on my old computer after this incident and found that they are still working as I desire them to be. Here, I am not talking of a single code, but there are altogether 63 Nos. of codes which have stopped working after the migration. You will kindly appreciate that 63 Nos. of codes cannot go wrong at the same time. So, I feel the coding (referencing workbooks/worksheets) or anything for that matter which relates to the structure of the code cannot be blamed here. There may be a problem in the set up/ configuration of my new computer which is impeding the functioning of the macros and which I am not able to figure out.
 
Upvote 0
Well, without seeing your code and/or having access to your system, I am afraid that there probably isn't much more assistance I can offer.

I would recommend adding a break-point to the Message Box we just added, and try running the code again. Then, it should stop at this line of code.
You can then proceed through your code line-by-line using the F8 key to see exactly what is going on.
If you do this while watching what happens on your sheets, many times the problem will reveal itself.
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,607
Members
449,090
Latest member
vivek chauhan

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