Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DATA VALIDATION INPUT MESSAGE jpreman Excel Discussion (Misc queries) 6 October 30th 08 05:26 PM
Data Validation - input message yshridhar Excel Discussion (Misc queries) 0 January 28th 08 05:22 AM
Data Validation Input Message Klee Excel Discussion (Misc queries) 12 May 6th 07 01:24 PM
Data Validation Input Message Sandy Excel Worksheet Functions 1 March 8th 06 03:19 PM
Data validation input message DT[_4_] Excel Programming 8 July 4th 04 12:16 AM


All times are GMT +1. The time now is 07:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"