Macros enable excel not generating upload files

Zaydah 0 Reputation points
2024-07-31T09:37:22.15+00:00

I have a problem with a protected macros enable excel when it comes to generating an uploaded file which is usually a zipped file. it keep giving me a pop up that the modifications are not saved, upload file not generated and cannot access a specific sheet in the workbook, when I click ok it gives run time error 1004 method range of object_global failed. Kindly note the the macros enable excel is right click disabled. I have tried using the same document on different desktops and its working fine so I figure there is something wrong with my excel setting excel errors.pdf I have also attached both errors for your reference. I have tried the below instructions, nothing has worked:

  1. Open Excel, click "File" -> "Options" -> "Trust Center" -> "Trust Center Settings"->"Macro Settings", make sure the setting is "Enable All Macros" or at least "Enable VBA Macros".
  2. If the above methods do not work, please try to repair the Excel application online:
  3. Please right-click on the bottom left corner ("Start" button, also known as the Windows logo), and then select "Installed Applications" in the pop-up menu.
  4. Select the Microsoft Office product you want to repair, click the ellipsis, and then select "Modify/Modify". (If modifying Excel alone doesn't work, please fix the whole Office)
  5. Depending on the type of Office installation (point-and-click or MSI-based), you will see Quick Fix and Online Fix. Please choose Online Repair.

Please refer to the link for detailed instructions on online repair

Kindly assist

Office
Office
A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.
1,724 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,972 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,999 questions
Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,937 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Neuvi Jiang 1,460 Reputation points Microsoft Vendor
    2024-08-02T07:31:23.6933333+00:00

    Hi Zaydah,

    Thank you for posting in the Q&A Forums.

    1. Confirm macro settings

    Ensure that Excel's macro settings are properly enabled. Follow the steps you have already tried:

    Open Excel, click "File" -> "Options" -> "Trust Center" -> "Trust Center Settings "Macro Settings.

    Ensure that "Enable all macros (not recommended; potentially dangerous macro code may be run)" is selected, or if for security reasons, "Enable VBA macros without notification" can be selected (this will allow macros to be run but will not be prompted each time it is opened).

    1. Check File Protection and Sheet Protection

    File Protection: Make sure the file is not set to read-only or otherwise protected, which may prevent modifications from being saved.

    Sheet Protection: Checks to see if the sheet is protected. If the worksheet is protected, certain operations (such as modifying cell contents or structure) will not be possible. You can unprotect the sheet by right-clicking on the sheet tab and selecting "Unprotect Sheet" (if you know the password). 3.

    1. Check for errors in the code

    Error 1004 is usually related to an object reference error in VBA code. Check your VBA code to make sure that all object references are valid and that there are no attempts to access non-existent worksheets or cells.

    Pay particular attention to whether fully qualified references are used when referencing workbooks and worksheets (e.g., Workbooks("WorkbookName.xlsx").Sheets("Sheet1")).

    Check for any misspellings or missing object names.

    1. Clean up Excel and restart

    Sometimes Excel may have problems due to previous errors or residual settings. Try closing all instances of Excel and then reopening it.

    If the problem persists, consider restarting the computer.

    1. Use Excel's "Repair" feature

    If you suspect that there is a problem with your Excel installation, try using Office's "Repair" feature. Right-click on the Windows Start button, select "Applications and Features", find Microsoft Office, click "Modify" or "Change", and then Select "Online Repair". 6.

    1. Check for other possible problems

    Make sure your version of Excel is compatible with the macro code. If the code was written for an older version of Excel, you may need to make the appropriate changes in the new version.

    If you are working in a network environment, check your network connection and permission settings to ensure that the macro is not blocked from executing.

    Best regards

    NeuviJ

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.