Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

VBA Data validation using formula Indirect reference

$
0
0

I have a following code recorded but if i run it from vba it is throwing me an error (2nd line). You can do it manually but it gives you the warning and if proceed with the warning then it takes the formula in Data validation. Anybody expalin why it is not working through vba?.

     With .Range("F13").Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=INDIRECT(E13)"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With

E13 is initially empty , it is a user selectable list.

Thanks


Viewing all articles
Browse latest Browse all 88066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>