Public Class fSelectArea Private Sub fSelectArea_Load(sender As Object, e As EventArgs) Handles MyBase.Load ComboBox1.Items.Clear() ComboBox1.DataSource = DSET1.tbl_weather ComboBox1.DisplayMember = "건물위치" ComboBox1.ValueMember = "code" If ComboBox1.Items.Count > 0 Then ComboBox1.SelectedIndex = 0 End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click If ComboBox1.SelectedIndex < 0 Then MsgBox("선택하지 않았습니다", MsgBoxStyle.Critical, "확인") Return End If DialogResult = DialogResult.OK End Sub End Class