Prev Previous Post   Next Post Next
  #5   Report Post  
c
 
Posts: n/a
Default

Thank you both for the help.

I think this macro will work well for me but it may conflict with another
oneI am already using that creates a second sheet based on the first. So
before I go through the long process of updating the second macro is there
any other methods that could accomplish this?

Thanks again,
c

"Debra Dalgleish" wrote:

You could use a worksheet_Change event to display the selected list, or
show the original list if the cell is cleared. For example:

'=============================
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$2" Then
If Application.WorksheetFunction _
.CountIf(Range("MonthList"), Target.Value) Then
With Target.Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, _
Formula1:="=" & Target.Value
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Else
If Target.Value = "" Then
With Target.Validation
.Delete
.Add Type:=xlValidateList, _
AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, _
Formula1:="=MonthList"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End If
End If
End If
End Sub

'============================



 
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
How to change fonts in drop down list Dennis Excel Discussion (Misc queries) 1 January 12th 05 01:49 PM
formatting drop down list dennis Excel Discussion (Misc queries) 2 January 11th 05 04:21 PM
create a drop down list with the source from a different workbook Sampath Excel Discussion (Misc queries) 2 January 8th 05 07:57 PM
edit a drop down list paulp Excel Discussion (Misc queries) 1 December 22nd 04 03:20 PM
Drop dow list complication Ryan Excel Discussion (Misc queries) 2 December 16th 04 07:49 PM


All times are GMT +1. The time now is 10:23 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"