Dear Gaurav Semwal1,
Good day! Thank you for posting to Microsoft Community. We are happy to help you.
Based on your description, we understand that you meet the error message" Runtime error 1004"
Please try the following suggestions first to see if they help you:
1. Delete the GWXL97.XLA Files to Fix Runtime Error 1004 in Excel
The easiest method to fix the Excel error 1004 is to find and delete the error file.
Step 1. Go to C:\Program Files\MS Office\Office\XLSTART.
Step 2. Find GWXL97.XLA file and delete it.
Step 3. Reopen your Excel file and check if the problem is solved.
2. Check the Trust Access to the VBA Project Object Model
Another solution you can try is to enable a VBA project trust option in Excel Trust Center. Follow the detailed steps and have a try.
Step 1. Open a blank Excel file and click "Files" on the upper left.
Step 2. Click Option and go to Trust Center.

Step 3. Find and enter the Trust Center Settings.

Step 4. Under Macro Settings, tick the option of "Trust access to the VBA project object model."

Now you can check your Excel file.
If the above suggestions did not help you, please provide the following information:
- The version information of your Excel(File->Account->Product information)
- Does this also happen to other workbooks?
- Have your colleagues also experienced this problem?
Sincerely,
Tin | Microsoft Community Moderator