0

を使用して、1 つの MsgBox に複数のメッセージを含めたい\n。MsgBox が表示されたら、この文字列を削除する必要があります。

これは私のコードです。

Dim Msg As String = ""
Dim EmployeeFirstName As String
Dim EmployeeLastName As String
EmployeeFirstName = txtFirstName.Text.Trim
EmployeeLastName = txtLastName.Text.Trim
If EmployeeFirstName = "" Then
  Msg = "Please enter First Name!"
  Msg += "/n"
End If
If EmployeeLastName = "" Then
  Msg += "Please enter Last Name!"
  Msg += "/n"
End If
If ddlGender.SelectedItem.Value = -1 Then
  Msg += "Plrase Select department"
  Msg += "/n"
End If
MsgBox(Msg)
4

2 に答える 2

1

このような ...

Msg = "Please enter First Name!" & vbCrlf
Msg &= "Please enter Last Name!" & vbCrlf
Msg &= "Please Select department"
于 2013-06-13T07:47:03.710 に答える