If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Or OptionButton1.Value = False And OptionButton2.Value = False And OptionButton3.Value = False Then
MsgBox ("資料未輸入完整, 『 * 』 必須輸入" & vbCrLf & _
"Data is not enter the full , 『 * 』 you must fill ")
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Or OptionButton1.Value = False And OptionButton2.Value = False And OptionButton3.Value = False Then
MsgBox ("資料未輸入完整, 『 * 』 必須輸入" & vbCrLf & _
"Data is not enter the full , 『 * 』 you must fill ")
Exit Sub
End If
If OptionButton1.Value = True Then Sheets("FMC Input Database").Range("A" & ActiveCell.Cells.Row + 1) = "201"
If OptionButton2.Value = True Then Sheets("FMC Input Database").Range("A" & ActiveCell.Cells.Row + 1) = "Setup Return"
If OptionButton3.Value = True Then Sheets("FMC Input Database").Range("A" & ActiveCell.Cells.Row + 1) = "261"
Private Sub CommandButton1_Click()
Dim k&, Arr(1 To 7) '定一個〔陣列〕容納資料
For k = 1 To 5
If k <= 3 Then If Me("OptionButton" & k) = True Then Arr(1) = Me("OptionButton" & k).Caption
'_如果選項為 True,將其〔按鈕文字〕加入陣列1
Arr(k + 1) = Me("TextBox" & k)
'_將文字方塊內容加入陣列2∼6
If Arr(k + 1) = "" Then Arr(1) = "": Exit For
'_如果文字方塊為空,將陣列1清空,跳出迴圈
Next k
If Arr(1) = "" Then MsgBox ("資料未輸入完整, 『 * 』 必須輸入" & vbCrLf & _
"Data is not enter the full , 『 * 』 you must fill "): Exit Sub
'_以〔陣列1〕當作檢查輸入是否完整的標的