Forum Discussion
Excel Macros Issues
Hi all,
A few years ago, a friend wrote a Macros for an excel sheet we use to populate an action plan. The concept is very simple. The Macros goes through the tab and pulls relevent cells through to an another tab creating an action plan. Each item goes under a heading and creates a new line. This has worked like a dream for the last 5 years.
Just recently, the macros has started throwing up errors when i run it. Its having issues with Row Height, and doesn't finish running the script, and Excel just hangs.
I've replicated this issue on a number of computers, new and old, and tried to swap between Mac and PC. This issue remains the same. The only commonality is the latest version of Excel. Unfortunately rolling back a version is not an option.
Have MS updated something that would affect the way this Macros works? Can anyone suggest a solution?
Any assistance is appreciated. Many thanks D.
1 Reply
- NikolinoDEGold Contributor
If you are experiencing issues with a previously functioning Excel macro that has started throwing errors and causing Excel to hang, it is possible that changes in the latest version of Excel or updates to the underlying operating system could be causing compatibility issues.
Here are a few steps you can take to troubleshoot and resolve the issue:
- Update the macro code: If the macro was created a few years ago, it's possible that changes in Excel over time have caused compatibility issues. Review the macro code and make any necessary updates to ensure it is compatible with the latest version of Excel. Check for deprecated or obsolete functions or features that may need to be replaced or modified.
- Enable "Trust access to the VBA project object model": In some cases, Excel's security settings may restrict the execution of macros, resulting in errors or hangs. To resolve this, go to the Excel options, navigate to the "Trust Center" settings, click on "Trust Center Settings," and then select "Macro Settings." Enable the option "Trust access to the VBA project object model" if it is not already enabled.
- Check for macro security settings: Verify that the security settings for macros are appropriately configured. Make sure the macro file is stored in a trusted location or enable macros to run from any location if necessary.
- Debug and error handling: Review the macro code and implement proper error handling techniques. Add error handling routines to handle potential errors and exceptions that may be occurring during the execution of the macro. This can help identify the specific line or section of code that is causing the issue.
- Test on different versions of Excel: If possible, test the macro on different versions of Excel to see if the issue is specific to the latest version. This can help determine if the problem is related to Excel itself or specific to the macro code.
- Contact the macro creator or Excel support: If you are unable to resolve the issue on your own, consider reaching out to the person who originally created the macro for assistance. Alternatively, you can contact Microsoft support for further guidance and troubleshooting.
By following these steps, you should be able to identify and resolve the issues with the Excel macro. Remember to back up your Excel file before making any changes to ensure you do not lose any important data or functionality. The text and the steps were created with the help of AI.
In order to be able to provide more precise information, it would make sense to insert the file (without sensitive data) or the VBA code. Additional information about the Excel version, file extension, operating system, storage medium, etc. would be beneficial.
My answer is voluntary and without guarantee.
Hope this will help you.