VB百分比问题

Private Sub ChuanSong()
Dim a, b As String
a = Text3.Text
b = 10
If Check8.Value = 1 Then
Text3.Text = Val(a) / Val(b) + Val(a)
Else
Text3.Text = Val(a)
End If
FMain1.Text4(0).Text = i
FMain1.Text4(1).Text = Val(Me.Text3.Text)
Call FMain1.HuiChe
End Sub 哪里错了,?请高手加我Q,详细说明
最新回答
醒来后我哭笑

2024-11-30 08:04:07

Private Sub ChuanSong()
Dim a, b As String
a = Text3.Text
b = "10"
If Check8.Value = 1 Then
Text3.Text = str(Val(a) / Val(b) + Val(a))
Else
Text3.Text = a
End If
FMain1.Text4(0).Text = str(i)
FMain1.Text4(1).Text = Me.Text3.Text
Call FMain1.HuiChe
End Sub
零落浮华

2024-11-30 08:02:19

Dim a, b As String改成:Dim a, b你的问题就是类型没有定义好