0
セルに検証リストを割り当てようとしています。バリデーションリストは、あるセルの値に応じて可変であり、例えば、セル「C6」の値が28の場合、バリデーションリストは、範囲「Sheet4.Range( "b4:b20")である。あなたが検証リストは、これを実行する別のsheet.inオーダーからである見ることができるように私は今、何が起こる以下のコードVBAを使用したセル検証
ValrStart = Sheet4.Cells(rowno, 4).Address ‘rowno is the row in which the validation list starts and its value comes from another part of the code
ValrEnd = Sheet4.Cells(rownoEnd, 4).Address rownoEnd is the row in which the validation list ends and its value comes from another part of the code
Rng = "Sheet4.Range(""" & ValrStart & Chr(58) & ValrEnd & """" & ")"
With Cells(20, 3).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:=Rng
.ErrorMessage = "Invalid value. Select one from the dropdown list."
check = Cells(20, 3).Validation.Value
If check = False Then
Cells(20, 3).ClearContents
Exit Sub
End If
End With
を書いたものをセルに私には見えるが、文字列の値がないRNGされていることですそれが表す範囲。 誰でも助けることができますか?問題は、「=」その始まり
で私はあなたが好きなのためにExcelがハードワークを行う必要があるだろう持っている必要がありますFormula1
パラメータ、である おかげ