+ Reply to Thread
Results 1 to 2 of 2

Macro to select an item in a Validation List

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    16

    Macro to select an item in a Validation List

    Hi, I've been getting a lot of great help in here but I needed one more answer to complete my current Excel project.

    I would like to create a "Reset" macro that will change a couple of validation lists back to the first choice; which is "All".

    This one works but it does not trigger my other code when "All" is typed in there:

    Sub ResetAll()
    
    Application.ScreenUpdating = False
    
    Dim myRng As Range
    
    Set myRng = Range("D3:D5")
    myRng.Value = "All"
                
    Set myRng = Range("D3")
    myRng.Value = ""
    
    Application.ScreenUpdating = True
    
    End Sub
    Is there a way to make the macro select the item because this one seems to type it in but it doesn't cause my other code to trigger upon clicking the macro.

    Thank you for any help!

    -Evan
    Last edited by emwhite; 12-16-2010 at 10:44 AM.

  2. #2
    Registered User
    Join Date
    12-11-2010
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Macro to select an item in a Validation List

    I was able to get this one to work that I found from a 3rd page google search! lol

    Sub ResetAll()
    
    Range("D4").Value = "All"
    
    Range("D5").Value = "All"
    
    Range("D3").Value = ""
    
    End Sub

+ 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