VB子程序或函数未定义要怎么办?

原问题:VB子程序或函数未定义要怎么办?
分类:编程开发 > 最后更新时间:【2017-07-12 09:18:08】
问题补充:

这是一个制作简单的计算机的编程

Private Sub Command1_Click(Index As Integer)

Select Case Index

Case 0 To 9

If firstnum Then

strnurm1 = st(Index) '实型转字符型

Else '非初赋值

strnum1 = strnum1 + Str(Index)

End If

test1.Text = strnum1 '显示

End Select

Case 10

If Not pointflag Then '如果没有小数点

If firstnum Then '如果是第一个字符

strnum1 = "0."

firstnum = False

Else

strnum1 = strnum1 + "."

End If

Else '已有小数点

Exit Sub '则退出单击事件

End If

pointflag = ture

Text1.Text = strnum1

End Sub

最佳答案

二处有问题:

1、trnurm1 = st(Index) 应该是 trnurm1 = Str(Index)

2、End Select 的位置似乎不妥,应该放在最后吧

最佳答案由网友  .旧巷.  提供
公告: 为响应国家净网行动,部分内容已经删除,感谢网友理解。
16

分享到:

其他回答

暂无其它回答!

    推荐