+ Reply to Thread
Results 1 to 2 of 2

EXCEL 2010 - Compile error in hidden module

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    virginia, USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question EXCEL 2010 - Compile error in hidden module

    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

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: EXCEL 2010 - Compile error in hidden module

    Hello MNKDURRANI and welcome to the forum.

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1