dim a as string=textbox1.text
dim score as integer =cdbl(val(a.text)) '重点是这里
if score > 12 then
.....
end if
本文提供了一个使用VBA进行简单条件判断的例子。通过将文本框中的内容转换为整数并进行大于12的判断,展示了如何在VBA中实现基本的数据读取与逻辑判断流程。
dim a as string=textbox1.text
dim score as integer =cdbl(val(a.text)) '重点是这里
if score > 12 then
.....
end if
933

被折叠的 条评论
为什么被折叠?