private sub form_click()
dim b as string,d as long
d=val(inputbox("请输入一个十进制数","输入"))
do while d>0
b=d mod 2 & b
d = d \ 2
loop
print b
end sub
两个地方需要改
1、
dim b as long,d as boolen
改成这个
dim b as String,d as long
2、
b=b&d/2
改成这个
b = d Mod 2 & b