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:office:office" /><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:office: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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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