|
Unload Me
UserForm1.Show
↑
こんな使い方してもいいんですか?
宜しくお願いします!
Private Sub CommandButton_Click()
Dim tot As Long
Dim IsOK As Variant
Dim myMSG As String
Dim myFlg As Boolean
myFlg = False
If CheckBox1.Value = True Then
myMSG = myMSG & CheckBox1.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If CheckBox2.Value = True Then
myMSG = myMSG & CheckBox2.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If CheckBox3.Value = True Then
myMSG = myMSG & CheckBox3.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If CheckBox4.Value = True Then
myMSG = myMSG & CheckBox4.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If CheckBox5.Value = True Then
myMSG = myMSG & CheckBox5.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If CheckBox6.Value = True Then
myMSG = myMSG & CheckBox6.Caption & vbCrLf & vbCrLf
myFlg = True
End If
If myFlg = True Then
If MsgBox(Chr(10) & Chr(10) & myMSG & " にチェックが入っています。この選択でいいですか?", _
vbYesNo + vbDefaultButton2 + vbQuestion, "重要") = vbYes _
Then
Else
Unload Me
UserForm1.Show
End If
Else
myMSG = "いずれにもチェックが入っていません"
End If
'CheckBox1.Value = False
'CheckBox2.Value = False
'CheckBox3.Value = False
'CheckBox4.Value = False
'CheckBox5.Value = False
'CheckBox6.Value = False
'IsOK = True
'Hide 作成中なのでまだ続きます!
End Sub
|
|