61
792
35
顶梁支柱
Public Function MakeTen(X As Integer) ' make an int at least ten. If X >= 10 Then ' how do I return the value? End Else X = 1 + X MakeTen (X) End If End Function Sub MainProc() ' How do I ask for a value? ' (dialog box is fine but how do I convert the string to an int?) ' ie Userform1.TextBox1.text ... MakeTen (...) ' now that I have an int at least ten how do I display it in a msgbox. End Sub
本帖以下内容被隐藏保护;需要你回复后,才能看到!
使用道具 举报
0
9
5
初来乍到
Public Function Times10 ( Argument as Integer ) As Integer Times10 = 10 * Argument End Function
6
Public Function MakeTen(X As Integer) As Integer ' make an int at least ten. If X >= 10 Then MakeTen = X Else MakeTen = 10 End If End Function Sub MainProc() Dim strValue As String Dim i As Integer strValue = InputBox("Please enter an Integer", "theswamp.org", 1) i = MakeTen(CInt(strValue)) MsgBox i End Sub
7
4
8
3
本版积分规则 发表回复 回帖后跳转到最后一页
微信公众平台
扫描访问手机版
点击图片下载手机App
|关于我们|小黑屋|乐筑天下 繁体中文
GMT+8, 2025-7-4 09:54 , Processed in 1.148602 second(s), 64 queries .
© 2020-2025 乐筑天下
在线时间:10:00-17:00
暂无
扫一扫,关注我们
帮助中心
关于我们
下载APP客户端