Dim label AsString= Trim(SdDataGridView.Rows(n).Cells(2).Value.ToString)
For m = 1 To Len(label)
If Mid(label, m, 1)<"0"Or Mid(label, m, 1)>"7"Or Len(label)<> 3 Then
MessageBox.Show("请在LABEL单元格内为3位的八进制数")
Return
EndIf
Next
'判断data是否为十六进制
Dim data AsString= Trim(SdDataGridView.Rows(n).Cells(3).Value.ToString)
For m = 1 To Len(data)
' Label5.Text = Mid(data, m, 1)
IfNot((Mid(data, m, 1)>="0"And Mid(data, m, 1)<="9")Or(Mid(data, m, 1)>="A"And Mid(data, m, 1)<="F")Or(Mid(label, m, 1)>="a"And Mid(data, m, 1)<="f"))Then
MessageBox.Show("请在DATA单元格内输入十六进制数")
Return
EndIf
Next
'判断ssm是否为二进制
Dim ssm AsString= Trim(SdDataGridView.Rows(n).Cells(4).Value.ToString)
For m = 1 To Len(ssm)
If Mid(ssm, m, 1)<"0"Or Mid(ssm, m, 1)>"1"Or Len(ssm)<> 2 Then
MessageBox.Show("请在SSM单元格内为2位的二进制数")
Return
EndIf
Next
'判断sdi是否为二进制
Dim sdi AsString= Trim(SdDataGridView.Rows(n).Cells(5).Value.ToString)
For m = 1 To Len(sdi)
If Mid(sdi, m, 1)<"0"Or Mid(sdi, m, 1)>"1"Or Len(sdi)<> 2 Then