在窗体上建立一个名称为Text1的文本框,建立一个名称为Cmd1,标题为"计算"的命令按钮

2025-01-20 16:54:42
推荐回答(1个)
回答1:

private sub cmd1_click()
dim i as integer,s as integer

for i=100 to 200
if i mod 3=0 then s=s+i

next

text1=s
open app.path & "\out.txt" for output as #1
print #1,s
close #1
end sub