在类模块ClsMan中加入如下代码:
public Weight as integer
public Height as integer
public function OverWeight() as boolean
OverWeight=false
if Weight>1.1*(Height-105) OverWeight=true
end function
在form1中加入如下代码
private sub form_load
dim Man1 as ClsMan
Man1.Weight=inputbox("******")
Man1.Height=inputbox("******")
if Man1.OverWeight then Msgbox "超重"
end sub
什么是类啊?
类模块?