+ Reply to Thread
Results 1 to 2 of 2

Greying out and disabling cells based on drop down selection

  1. #1
    Registered User
    Join Date
    03-23-2011
    Location
    America
    MS-Off Ver
    Excel 2007
    Posts
    4

    Greying out and disabling cells based on drop down selection

    Hi,

    I searched the forums for the code necessary and I modified it to my use:

    Please Login or Register  to view this content.
    This code is placed in the "Gear Choice" Sheet code. As the title suggests, I want to disable and gray out the 2 rows below a drop down cell if the vlookup returns true. My problem is that when I try and change something in the excel document to run this code, it throws an error saying, "Compile error. Sub or Function is not defined", pointing to the first line of the code. At first I thought this was a scope issue, so I transferred the code to the "ThisWorkbook" code area using Workbook_SheetChange syntax instead of Worksheet_Change syntax. This didn't work either. It still throws the same error. Attached is my project.

    Thanks,

    RichieSams
    Attached Files Attached Files
    Last edited by RichieSams2; 03-24-2011 at 07:40 PM.

  2. #2
    Registered User
    Join Date
    03-23-2011
    Location
    America
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Greying out and disabling cells based on drop down selection

    I debugged the code part by part and it turned out the VLOOKUP was causing the sub to be undefined. I'm thinking that I just need to find the add in that lets me use this in VBA. In the mean time I just did the vlookup in excel and just hid that cell.

    Final code:
    Please Login or Register  to view this content.
    RichieSams

+ 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