+ Reply to Thread
Results 1 to 3 of 3

Macro activated by drop-down list - code not working

  1. #1
    Registered User
    Join Date
    12-21-2015
    Location
    Brighton
    MS-Off Ver
    2013
    Posts
    2

    Macro activated by drop-down list - code not working

    Hi, I'm new to macros. I want the macro to activate with one of the choices of a drop down list. I want the macro to clear a range of cells. The code I have is:

    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

    Select Case Range("M17")

    Case "Choice 1"
    Range("V18:AC18").Select
    Selection.ClearContents

    End Select

    End Sub

    I get run time error 28 Out of stack space.

    Could someone let me know what I am doing wrong?? thanks!!

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Macro activated by drop-down list - code not working

    Can you explain a bit more what you want. The above code makes no sense
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    12-21-2015
    Location
    Brighton
    MS-Off Ver
    2013
    Posts
    2

    Re: Macro activated by drop-down list - code not working

    I want a choice from a dropdown list to activate a macro which clears a range of cells...

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA code working with drop list with words instead of numbers
    By rcasquinha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2015, 10:34 AM
  2. vba code for copying data to cell and applying macro (drop down list)
    By Tamjeed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2014, 10:57 AM
  3. [SOLVED] Change Pivot tables with Macro activated by flexible entry on a Dependent Drop Down List
    By Portuga in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-17-2013, 07:29 PM
  4. Need Macro Code to 'update' drop down list
    By Pencil101 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-26-2013, 04:46 AM
  5. [SOLVED] Conditional code when drop down has been activated
    By EngineeringScientist in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2012, 07:54 AM
  6. drop down box activated and filled by another's action
    By roytom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 02:44 PM
  7. showing drop down list when combo box is activated
    By dhavanchopra in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2007, 07:49 AM

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