不晓得以下程式是否是你想要的,请回复
Public Sub n() Dim shuz As Double, shuu As Double, weishu As Double shuz = InputBox("") shuu = FormatNumber(shuz, 0, vbTrue, vbTrue, vbTrue) weishu = Len(CStr(shuz)) - Len(CStr(shuu)) - 1 Select Case weishu Case -1 weishu = 0 End Select MsgBox weishu End Sub
|