| Private Sub CommandButton11_Click() If TextBox1.Value <> "" Then Range("C9") = TextBox1.Value If TextBox2.Value <> "" Then Range("C10") = TextBox2.Value If TextBox3.Value <> "" Then Range("C11") = TextBox3.Value If TextBox4.Value <> "" Then Range("C12") = TextBox4.Value If TextBox5.Value <> "" Then Range("C13") = TextBox5.Value Me.Hide Unload Me MsgBox "입력완료" Module1.저장 End Sub Private Sub CommandButton12_Click() Module1.신규등록모드 End Sub Private Sub CommandButton17_Click() Module1.입고_클릭 End Sub Private Sub CommandButton18_Click() Module1.출고_클릭 End Sub Private Sub CommandButton3_Click() Module1.공정선택 End Sub Private Sub UserForm_Activate() Me.Width = 377 Me.Height = 450 End Sub Private Sub CommandButton1_Click() If TextBox1.Value <> "" Then Range("C9") = TextBox1.Value If TextBox2.Value <> "" Then Range("C10") = TextBox2.Value If TextBox3.Value <> "" Then Range("C11") = TextBox3.Value If TextBox4.Value <> "" Then Range("C12") = TextBox4.Value If TextBox5.Value <> "" Then Range("C13") = TextBox5.Value Me.Hide Unload Me MsgBox "입력완료" End Sub |
이 메인 폼에서 CommandButton3 Module1.공정선택을 UserForm1을 만들었어요
UserForm1 의 ListBox1 값이
| Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) [C8] = ListBox1.List(ListBox1.ListIndex, 0) Unload Me End Sub Private Sub UserForm_Activate() Me.Width = 200 Me.Height = 400 Me.Left = 200 Me.Top = 100 End Sub |
이건데요 UserForm1이 실행되고 더블클릭해서 "C8"번에 입력되고 창이 닫아지기까진 되는데 메인이되는 폼까지 창이 닫아지는 문제가 있어요..ㅠ
UserForm1만 창닫아지고 메인폼은 유지 될 방법이 없을까요?

메인이 되는 폼은 modal true로 하시고.. 서브 폼은 modal false로 하면 잘 될겁니다.