Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to create a UDF that when placed in a cell will create a validation
for that cell. The challenge is how to keep the UDF in the cell's formula when the user makes a selection from the validation's drop-down list? So for example, I might have a UDF Function foo() As Variant With Application.Caller.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="a,b,c" .InCellDropdown = True End With foo = "a" ' make sure the cell starts with a valid selection End Function So somebody can then type "=foo" into cell A1 to have the validation list added. However when the user makes a selection (e.g., b or c) from the validation, I don't want to lose "=foo" as the formula. Any suggestions? TIA, josh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Why is a formula written this way? | Excel Worksheet Functions | |||
Identify if Cell is Formula or written number | Excel Worksheet Functions | |||
macro-written correct formula returns #NAME? and #VALUE? | Excel Programming | |||
Is there a formula to change number value to the written value? | Excel Discussion (Misc queries) | |||
Strange thing with this formula written by VBA | Excel Programming |