![]() |
Macro to pause for user input in dialog box
I have a macro that i want to select a 500 cells, go into the Data Validation
menu, and then pause so that the user can input their particular validation parameters and the input message. Then when the use hits OK, I'd like the macro to continue on it's way. Here's what I have, but it just selects the cells and doesnt open the dialog box. Application.Goto Reference:="R1C3:R500C3" With Selection.Validation .Delete .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _ :=xlBetween .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True Any help with explanation is appreciated as this is a feature I'd like to use in several different scenarios. Thanks. |
You can everything within the With clause with
Application.Dialogs(xlDialogDataValidation).Show "kayabob" wrote: I have a macro that i want to select a 500 cells, go into the Data Validation menu, and then pause so that the user can input their particular validation parameters and the input message. Then when the use hits OK, I'd like the macro to continue on it's way. Here's what I have, but it just selects the cells and doesnt open the dialog box. Application.Goto Reference:="R1C3:R500C3" With Selection.Validation .Delete .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop, Operator _ :=xlBetween .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True Any help with explanation is appreciated as this is a feature I'd like to use in several different scenarios. Thanks. |
All times are GMT +1. The time now is 04:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com