Free Microsoft Excel 2013 Quick Reference

Compile error in hidden module 3 openning excel Results

Hi,
If anyone knows how to fix the following issue, I will really appreciate.

I converted the application built in ms excel 2003 to ms excel 2010. There is a code auto excute built in excel 2003 which runs when user open the workbook. This code is sitting in module 9. When I converted the file into ms excel 2010 and then open the file it give me a message - "Compile Error in hidden module: MODULE 9" Along with the message "This error commonly occurs when code is incompatible with the version, platform or architecture of this application."

The code is as follows which was in excel 2003:

Sub Auto_Open()
'
'
'
Worksheets("Marketing_Model").Select
ActiveSheet.Unprotect
Range("I5").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
'
Worksheets("Marketing_Model").Select
Range("A1").Select
'
Worksheets("Sales_1").Select
ActiveSheet.Unprotect
Range("D8").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
'
Worksheets("COST SUMMARY").Select
ActiveSheet.Unprotect
Range("B9:D9").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
'
Worksheets("REVENUE SUMMARY").Select
ActiveSheet.Unprotect
Range("C5").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
'
Worksheets("TAX SUMMARY").Select
ActiveSheet.Unprotect
Range("K8").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("K9").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("K10").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("B14").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("B15").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("B16").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
'
Worksheets("BALANCE").Select
ActiveSheet.Unprotect
Range("D9").Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("F9").Select
Selection.NumberFormat = "mm/dd/yyyy"
'
Range("D8").Select
VAR_1 = 8
Do Until Range("D" & VAR_1).Value = "Dates:"
Range("D" & VAR_1).Select
VAR_1 = VAR_1 + 1
Loop
ActiveCell.Offset(3, 0).Select
Selection.NumberFormat = "mm/dd/yyyy"
ActiveCell.Offset(1, 0).Select
Selection.NumberFormat = "mm/dd/yyyy"
Range("A1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Worksheets("Marketing_Model").Select
Worksheets("BALANCE").Select
'
End Sub

Thanks


No luck finding an answer? You could always try Google.