Excel VBA: Named range + string value as validation list?

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 .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="=nameRange, name" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With 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前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » excel

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏