第1个回答 推荐于2017-10-03
假如有一个过程:
Private Sub Dy(B As Integer)
Print B
End Sub
你有下面几种调用方法:
Private Sub Command1_Click()
Dim k As Integer
k = 9
Dy k
Call Dy(k)
Dy 3
Dy (5)
End Sub本回答被提问者采纳
第2个回答 2010-05-05
单独一句,用你Sub的名字就可以了,前边的Call可加可不加
第3个回答 2019-11-21
10转8可以直接用vb提供的函数oct
10转16可以直接用vb提供的函数hex
function
d2b(byval
n
as
integer)
as
string
dim
t
as
string
if
n
=
0
then
t
=
"0"
do
until
n
=
0
t
=
n
mod
2
&
t
n
=
n
\
2
loop
d2b
=
t
end
function
private
sub
command1_click()
dim
n
as
integer
n
=
val(inputbox("输入一个正正数:"))
print
"十进制:"
&
n
print
"二进制:"
&
d2b(n)
print
"八进制:"
&
oct(n)
print
"十六进制:"
&
hex(n)
end
sub