+ Reply to Thread
Results 1 to 3 of 3

Macro to hide columns in Excel 2007

  1. #1
    Registered User
    Join Date
    02-26-2009
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2003
    Posts
    11

    Macro to hide columns in Excel 2007

    I have written a macro to hide any column (within a range of columns) that has an 'x' in it. By putting the 'x' in the column, it allows the allows the user to choose what columns they want to hide. I have an inverse macro as well that unhides those hidden columns.

    These macros work perfectly in Excel 2003, but they do not work in Excel 2007. In Excel 2007 I get a compile error: can't find project or library. As a note, all other macros in my spreadsheet (Module 1) work.

    Could somebody help me to get these to work in Excel 2007? Here is the macro to hide columns that does not work in Excel 2007:

    Please Login or Register  to view this content.
    Any suggestions?
    Last edited by jdinning; 06-16-2009 at 08:02 PM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Macro to hide columns in Excel 2007

    Nothing wrong with the code. Works fine in xl2007.

    Go to the VBE and use Tools > References, and check for any Missing entries.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    02-26-2009
    Location
    Dayton, OH
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Macro to hide columns in Excel 2007

    Got it thanks. I went to references and found that a library showed missing. I unchecked it and then the macro ran.

    Thanks for your help.

+ 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