1.先設置單元格為 保留2位小數。
2.判斷單元格內容
Dim line1 as single
Dim line2 as single
If Cells(2,2).Value = "" Then
line1 = 0
Else
if Not IsNumeric(Cells(2, 2).Text) Then
MsgBox "Input Data Error!"
End if
line1 = Cells(2,2).Value
End if
1.先設置單元格為 保留2位小數。
2.判斷單元格內容
Dim line1 as single
Dim line2 as single
If Cells(2,2).Value = "" Then
line1 = 0
Else
if Not IsNumeric(Cells(2, 2).Text) Then
MsgBox "Input Data Error!"
End if
line1 = Cells(2,2).Value
End if
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。