1樓:難得糊塗
『未定義全域性函式。
dim x%, y% 』加上這一句就可以了。
private sub check1_click()
x% = 1
end sub
private sub check2_click()
y% = 1
end sub
private sub command1_click()
if x% > 0 and y% = 0 then
text1.text = "item1"
if y% > 0 and x% = 0 then
text1.text = "item2"
end if
end if
end sub
private sub form_click()
if x% > 0 and y% > 0 then
text1.text = "不能全選"
end if
end sub
private sub form_load()
x% = 0
y% = 0
end sub
'實現你的功能其實有更簡單的方法,請參考
private sub command1_click()
if check1.visible = false and check2.visible = false then text1 = ""
if check1.visible = true and check2.visible = false then text1 = "item1"
if check1.visible = false and check2.visible = true then text1 = "item2"
if check1.visible = true and check2.visible = true then text1 = "不能全選"
end sub
'!謝謝!
2樓:匿名使用者
dim x as integer,y as integerprivate sub check1_click()x=check1.value
end subprivate sub check2_click()y=check2.value
end sub
private sub command1_click()if x =1 and y = 0 thentext1.text = "item1"
else
if y =1 and x = 0 thentext1.text = "item2"
end if
end if
end sub
private sub form_click()if x=1 and y=1 then
text1.text = "不能全選"
end if
end sub
private sub form_load()x=check1.value
y=check2.value
end sub
求高手!!到底哪裡出錯了
main中 break改為continue。即main中的 else break 改為else continue 你用break,裡層迴圈遇到一次else的情況即會跳出。int is prime unsigned n if n 2 return 1 return 0 bool prime int n...
高數多元積分請您幫我看看我哪裡出錯了
解 d x y dxdy 2,2 d acos a r dr 2,3 2 d 0,a r dr 2,2 d r 3 acos a 2,3 2 d r 3 0,a 2,2 a 3 1 cos d 2,3 2 a 3 d a 3 a 3 a 3 a 3 2 4 3 6 4 9 a 注 積分域d是大圓裡套...
VB編寫有什麼錯誤,VB這題哪裡出錯了?
do while i 100 sum sum 1 i i 1 loop 把上面的改為 do while i 100 sum sum i 注意這裡是加i,不是加1i i 1 loop vb中常見錯誤提示 vb程式設計,大佬看下 錯了?樓主沒有把問題的要求說明清楚,現在只能檢查語法上的問題。其實 本身沒...