Excel Macro in Internet Explorer….can’t run

excelinternet explorervba

I have created an Excel 2003 (.xls) file (created macro using VBA). The Excel file is protected and has hidden worksheets. When I try to run the Excel macro in Internet Explorer, I get an error message "Method of class "Sheets" failed in object _Global". The macro runs fine in Excel.

I'm guessing that IE doesn't access the worksheets (hidden or otherwise) in the Excel Workbook.

Is there a way to declare the "sheets" or "worksheets" variable in my Excel VBA code so that the Excel macros can run in the IE window as well?
Is there a workaround to fix this problem?
I have to run the macro in IE.

Best Answer

You can offer your Excelfile for download. This way each user can run it on his/her own machine. Just provide a link to its location on a Web page, then the user can decide to download or run immediately. Naturally any modifications the user does, would not flow back into the source.