分太少了 text1输通话时长 秒数 Private Sub Command1_Click() h = CInt(Hour(Now())) sec = Text1.Text Select Case h Case 7 To 9: r = 1 Case Else: r = 0.5 End Select If sec <= 180 Then Sum = 0.5 * r Text2.Text = Sum Exit Sub Else Sum = (0.5 + (Int((sec - 180) / 60) + 1) * 0.15) * r End If Text2.Text = Sum End Sub