프로그램/VBA

vba 동적 리스트박스 셀 생성

milktea.kang 2011. 1. 18. 10:39
With Range("a1").Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="1,2,3,4,5"
        .IgnoreBlank = True
        .InCellDropdown = True
        .InputTitle = ""
        .ErrorTitle = ""
        .InputMessage = ""
        .ErrorMessage = ""
        .ShowInput = True
        .ShowError = True
    End With

이거 만든다고 어제 하루종일 삽질했네 ㅡㅡ;;;
Formula1의 데이터를 ","로 구분된 스트링으로 세팅하면 됨
Formula2는 Formula1중에 선택된 값(굳이 설정 안해도 되므로 생략)

'프로그램 > VBA' 카테고리의 다른 글

엑셀로 달력 만들기 [메모버전]  (1) 2011.02.16
파일 리스트 불러오기  (0) 2011.01.18