Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
Hi,
I'm a bit stuck with the above, I can use the Modify method to change the data validation criteria for a given range as in the code below: With Selection.Validation .Modify Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator _ :=xlBetween, Formula1:="=$S$3:$S$4" .ErrorTitle = "Invalid Entry" .ErrorMessage = "Enter Yes or No." End With However try as I might I cannot change the the actual title and message displayed when the cell is entered. I need to keep the validation criteria exactly as set and I think this is where I'm coming unstuck. I have tried the following code but this just gives me an error. With Selection.Validation .Modify .InputTitle = myTitle .InputMessage = myMessage End With Any help gratefully received. Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
Thanks Nigel,
I've done that but in doing so I have to re-write the validation criteria to all the cells. The thing is the InputText and InputMessage are the same for the whole row, it's just the validation criteria that changes by column. In some cases I may have 19 columns and upto 8000 rows to write so you can understand that a change of the Input criteria would be a far simpler option. Thanks Tony |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
With a bit of experimenting, it seems this works......
With Selection.Validation .InputTitle = myTitle .InputMessage = myMessage End With -- Regards, Nigel "tony" wrote in message ... Thanks Nigel, I've done that but in doing so I have to re-write the validation criteria to all the cells. The thing is the InputText and InputMessage are the same for the whole row, it's just the validation criteria that changes by column. In some cases I may have 19 columns and upto 8000 rows to write so you can understand that a change of the Input criteria would be a far simpler option. Thanks Tony |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
Cheers Nigel,
No joy there either, I get the run time error 1004 - Application- defined or Object-defined error. Doh! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
Well it worked for me (xl2007). Since you are using Selection, have you
selected a range with Validation allocated? Try fully referencing the range. -- Regards, Nigel "tony" wrote in message ... Cheers Nigel, No joy there either, I get the run time error 1004 - Application- defined or Object-defined error. Doh! |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
correction, it only works if the validation parameters are the same.
Try this strategy. Select entire range to have any validation to some default setting, with the titles and messages in place, then selectively modify the validation rules, exclude the titles and messages which you do not want to change. I think this is the reverse of your approach, I tried it and it appeared to work OK -- Regards, Nigel "Nigel" wrote in message ... Well it worked for me (xl2007). Since you are using Selection, have you selected a range with Validation allocated? Try fully referencing the range. -- Regards, Nigel "tony" wrote in message ... Cheers Nigel, No joy there either, I get the run time error 1004 - Application- defined or Object-defined error. Doh! |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modify Data Validation Input Message
Many thanks for your suggestions Nigel,
I think the problem could be down to the fact that the spreadsheet has to be usable by all version of excel not just 2007. I'm not going to pursue this any further as it'll probably cause problems to other users of the spreadsheet. Once again thanks for your help. Regards Tony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
DATA VALIDATION INPUT MESSAGE | Excel Discussion (Misc queries) | |||
Data Validation - input message | Excel Discussion (Misc queries) | |||
Data Validation Input Message | Excel Discussion (Misc queries) | |||
Data Validation Input Message | Excel Worksheet Functions | |||
Data validation input message | Excel Programming |