<!-- more --><img src="https://pimg.1px.tw/yi007snoopy/1203247284.jpg" /><br />程式碼:<br /><font face="Arial">Private Sub Command1_Click()<br />Dim x As Single<br />x = Val(InputBox("絕對值"))<br />If x >= 0 Then<br />MsgBox "|" & x & "|" & "=" & x<br />ElseIf x < 0 Then<br />MsgBox "|" & x & "|" & "=" & -x<br />End If<br />End Sub<br /></font>