Chris
You can't refer to another sheet, the workaround is to name your range and
use this name for the source range eg:
..Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,Operator:= _
xlBetween, Formula1:="=MyList"
Where "MyList" will refer to =Results!$M$11:$M$13
HTH
Cordially
Pascal
"Chris" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
Awesome!
That works exactly how I want, however, when I try to put it into VBA
(having taken the recorded code) I get the following error
Application-defined or object-defined error
My Code:
On Error GoTo ErrorHandler
With Range("A1").Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=$M$11:$M$13"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
ErrorHandler:
MsgBox ("Error - " & Err.Description)
End Sub
I've tried specifying Selection.Validation and also
Cells(1,1).Validation but it appears the code craps out on the
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=Results!$M$11:Results!$M$13"
Any insight?
Thanks in advance
On Sep 17, 8:32 am, "papou" <cpapoupasbon@çanonpluslaposte.net> wrote:
> Hello Chris
> See Data->Validation->Allow->List
>
> HTH
> Cordially
> Pascal
>
> "Chris" <chris.ole...@gmail.com> a écrit dans le message de news:
> 1190031530.161597.324...@19g2000hsx.googlegroups.com...
>
> > Hello,
>
> > I was wondering if it were possible to restrict the values that can be
> > entered into a cell (which I know can be done) but to allow for the
> > available options to be displayed when the user has the cell selected
> > (a-la combobox) without adding a new form to my worksheet or inserting
> > the oleobject "ComboBox"
>
> > Basically, I want the user to select a cell and have a chocie between
> > three strings
>
> > "Better"
> > "Same"
> > "Worse"
>
> > Thanks in advance