![]() |
|
![]() | ||
|
Subject:
Excel Automation of Cell Validation
Category: Computers > Programming Asked by: prg-ga List Price: $10.00 |
Posted:
07 Aug 2002 02:12 PDT
Expires: 06 Sep 2002 02:12 PDT Question ID: 51672 |
I have an Excel worksheet on a web page (using the OBJECT tag). I can use VBscript to automate data loading into the sheet. I want to specify that a cell (or range of cells) can only accept values from a defined list of values (i.e. standard list validation, displaying as a drop-down list box). How can I specify my list validation for specific cells using VBScript? Is it possible to define the list so that the list box displays text values but stores corresponding numeric key values (as you can do for a HTML select tag)? |
![]() | ||
|
There is no answer at this time. |
![]() | ||
|
Subject:
Re: Excel Automation of Cell Validation
From: chidam-ga on 04 Sep 2002 00:54 PDT |
For a cell in Excel, you can set the validation rules thru the Menu option Data->validation. Here is the vb macro. With Selection.Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="1,2,3" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "Error" .InputMessage = "" .ErrorMessage = "Only Numeric values can be entered" .ShowInput = True .ShowError = True End With |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |