LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Erasing cells when the validation dropdown choice changes

Can be done, but how do D16 and D17 get filled to start with?

Once cleared, what's to clear if another choice is made from the DV
dropdown?

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("D11")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
Me.Range("D16:D17").ClearContents
endit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste the code into that module.

Alt + q to return to Excel.


Gord Dibben MS Excel MVP

On Tue, 18 Aug 2009 12:51:01 -0700, Bob
wrote:

I have a validation dropdown box in cell D11. Cells D16 and D17 are
"regular" cells. Each time a user selects a different choice in D11, I need
to have the contents in D16 & D17 erased (i.e., revert to being blank cells).

Being relatively new to VBA, I have no idea how to program this. Can anyone
help me?

Thanks,
Bob


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop down list based on choice of another dropdown Amy Excel Discussion (Misc queries) 2 January 23rd 08 08:39 PM
Need to link dropdown box choice to another cell lrb Excel Discussion (Misc queries) 6 December 12th 07 08:08 PM
Multiple choice in dropdown list Augusta Excel Discussion (Misc queries) 1 October 19th 07 10:16 AM
populating a dropdown based on choice from a previous dropdown Conor[_3_] Excel Programming 2 March 9th 06 07:15 PM
Dropdown list/Multiple choice?? KDD Excel Discussion (Misc queries) 2 August 30th 05 09:28 AM


All times are GMT +1. The time now is 08:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"