Alright, basically what I want to do is set a data validation list for a specific cell.
This list should contain a certain range of cells I've specified PLUS a string value added to it.
I have a dialog box that asks the user for a name, and then I need the list to display containing a set range of cells with "Other: " & Name added to it.
name = "Test"
With Worksheets("Tijdsregistratie").Cells(aangepasteRij, 4).Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=nameRange, name"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
Something like the above code (obviously the formula doesn't work).
Is there any way to do this using a specific formula, or am I going to have to find another way to get this done? This might be of some help: stackoverflow.com/questions/4783019/â€¦
以上就是Excel VBA: Named range + string value as validation list?的详细内容，更多请关注web前端其它相关文章！