Hello friends,
I have a requirement in excel. I am totally new to macro programming so please guide me..
There is a drop down list in a field say M. Now after the user selects any one of the values from the dropdown menu, I should populate the field(M) with a acronym of that value(which is provided and can be hardcoded).
For example The user selects DECEASED from the drop down menu, but DEC gets stored in the cell.
for creating the drop down list i have used the following where n1-n18 are the drop down values:
.Range("m3:m" & iCurrentLastRow).Select
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$n$1:$n$18"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = "Withdrawal Code"
.ErrorTitle = "Withdrawal Code"
.InputMessage = "Please select a withdrawal code from the drop-down list"
.ErrorMessage = _
"You tried to enter an invalid withdrawal code. Please select a code from the list"
.ShowInput = True
.ShowError = True
End With
Please help me out!!..
Configuration: Windows XP Internet Explorer 6.0
Thanks for your answer.. but Actually the formula is already used for creating the drop down :
|
Hi
|
Hi
|