Closed Thread
Results 1 to 3 of 3

Using VBA : Either display dropdown box or a pre determined value based on ipunt in cell

  1. #1
    Registered User
    Join Date
    09-08-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    2

    Using VBA : Either display dropdown box or a pre determined value based on ipunt in cell

    Hi All,

    I am trying to design a macro that does the following:

    1. Allows user to input a value in a cell
    2. If the value is 'Yes", display a list
    3. If the value is 'No', display 'No' in the following Cell

    I have tried the code below but get a message saying that the stack is out of space

    Private Sub WorkSheet_Change(ByVal target As Range)
    If Range("$C$14") = "Yes" Then
    With Range("$C$16").Validation
    .Delete
    .Add xlValidateList, , , "=NA"
    .IgnoreBlank = True
    .InCellDropdown = True
    End With
    ElseIf Range("$C$14") = "No" Then
    Range("$C$16") = "No"

    End If
    End Sub

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Using VBA : Either display dropdown box or a pre determined value based on ipunt in ce

    Hi, mentor,

    please wrap your procedure with code-tags according to Forum Rule #3 in all your threads and please do not duplicate your threads (other thread: http://www.excelforum.com/excel-prog...-in-cell.html].

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Using VBA : Either display dropdown box or a pre determined value based on ipunt in ce

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-08-2014, 04:03 AM
  2. Replies: 0
    Last Post: 07-18-2013, 11:43 AM
  3. [SOLVED] Construct a formula on a pre-determined cell for a pre-determined duration of cells
    By Shaun Gemiver in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-03-2013, 11:14 AM
  4. Display Value based on Pre-determined Range
    By amonty78 in forum Excel General
    Replies: 8
    Last Post: 01-18-2012, 12:07 AM
  5. Adding Value of Cells, but Cell Determined by Dropdown List
    By concretetsunami in forum Excel General
    Replies: 4
    Last Post: 03-09-2010, 04:19 PM

Tags for this Thread

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