EXCEL 2010 - Compile Error in hidden module

NDurrani

New Member
Joined
Nov 22, 2010
Messages
4
Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:eek:ffice:eek:ffice" /><o:p></o:p>
If anyone knows how to fix the following issue, I will really appreciate.<o:p></o:p>
<o:p> </o:p>
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."<o:p></o:p>
<o:p> </o:p>
The code is as follows which was in excel 2003:<o:p></o:p>
<o:p> </o:p>
Sub Auto_Open()<o:p></o:p>
'<o:p></o:p>
'<o:p></o:p>
'<o:p></o:p>
Worksheets("Marketing_Model").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("I5").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
'<o:p></o:p>
Worksheets("Marketing_Model").Select<o:p></o:p>
Range("A1").Select<o:p></o:p>
'<o:p></o:p>
Worksheets("Sales_1").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("D8").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
'<o:p></o:p>
Worksheets("COST SUMMARY").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("B9:D9").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
'<o:p></o:p>
Worksheets("REVENUE SUMMARY").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("C5").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
'<o:p></o:p>
Worksheets("TAX SUMMARY").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("K8").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("K9").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("K10").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("B14").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("B15").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("B16").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
'<o:p></o:p>
Worksheets("BALANCE").Select<o:p></o:p>
ActiveSheet.Unprotect<o:p></o:p>
Range("D9").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("F9").Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
'<o:p></o:p>
Range("D8").Select<o:p></o:p>
VAR_1 = 8<o:p></o:p>
Do Until Range("D" & VAR_1).Value = "Dates:"<o:p></o:p>
Range("D" & VAR_1).Select<o:p></o:p>
VAR_1 = VAR_1 + 1<o:p></o:p>
<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:eek:ffice:smarttags" /><st1:place w:st="on">Loop</st1:place><o:p></o:p>
ActiveCell.Offset(3, 0).Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
ActiveCell.Offset(1, 0).Select<o:p></o:p>
Selection.NumberFormat = "mm/dd/yyyy"<o:p></o:p>
Range("A1").Select<o:p></o:p>
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True<o:p></o:p>
Worksheets("Marketing_Model").Select<o:p></o:p>
Worksheets("BALANCE").Select<o:p></o:p>
'<o:p></o:p>
End Sub<o:p></o:p>
<o:p> </o:p>
<o:p> </o:p>
Thanks
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top