|
こんにちは。
マクロで入力規制リストを作りたいってことですか?
Sub ajkkj()
Dim inrag As Range
Set inrag = Application.InputBox(Prompt:="範囲を決めてください。。", _
Title:="範囲", Default:=ActiveCell.Address, Type:=8)
If inrag Is Nothing Then Exit Sub
With Range("C1").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="=" & inrag.Address
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.IMEMode = xlIMEModeOff
.ShowInput = True
.ShowError = True
End With
End Sub
|
|