Cannot copy Excel/VBA file to new folder & run

thoss1

New Member
Joined
Sep 29, 2011
Messages
5
I had an existing Excel file. I need a new Sub. I copied the existing Excel into a folder I placed on my desktop. I added the new Sub and tested, it works fine. I saved and made backup copies. I then copied the file from the desktop folder back into the orignal folder. When I try to run out of the original folder I get a "Cannot run the Macro...... The macro may not be available in this workbook or all macros may be disabled." The macro is available in the workbook I copied to the original folder. All macros are enabled. :( What am I doing wrong?:confused:
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I had an existing Excel file. I need a new Sub. I copied the existing Excel into a folder I placed on my desktop. I added the new Sub and tested, it works fine. I saved and made backup copies. I then copied the file from the desktop folder back into the orignal folder. When I try to run out of the original folder I get a "Cannot run the Macro...... The macro may not be available in this workbook or all macros may be disabled." The macro is available in the workbook I copied to the original folder. All macros are enabled. :( What am I doing wrong?:confused:

Please close all the excel workbooks you've open completely and open it again....make sure the macro is enabled...

All the best
 
Upvote 0
Closed all open workbooks and tried again. Got same error. How do I make sure the Macro is enabled?:confused: When I go to File > Options > Trust Center > Trust Center Settings > Macro Settings the Enable all macros radial is selected. Do I have to do something else to enable the one new Sub I added. I have other macros that were already in the workbook that access a DB and extract different information. These work from either the folder on my desktop or from the original folder.
 
Upvote 0
Closed all open workbooks and tried again. Got same error. How do I make sure the Macro is enabled?:confused: When I go to File > Options > Trust Center > Trust Center Settings > Macro Settings the Enable all macros radial is selected. Do I have to do something else to enable the one new Sub I added. I have other macros that were already in the workbook that access a DB and extract different information. These work from either the folder on my desktop or from the original folder.

Alright, the macro is enabled that way....
Can i see your code? no thats not required....:)
is the workbook saved as macro enabled like xlsm, xls...etc?
Is this in SharedDrive?



 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

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