return value ni digunakan untuk beri effect terhadap message box yg anda hasilkan. jadi..takde la tekan Yes ke No ke tindakbalas dia sama je. tapi kena la guna penyataan if-else...
Button Value
OK 1
Cancel 2
Abort 3
Retry 4
Ignore 5
Yes 6
No 7
simple example (nak yg powers...cari la sendiri...hehe )
Private Sub cmdExit()
dim value1 as integer
value1 = msgbox ("Exit program?",vbOKCancel+vbQuestion,"Exit")
if value1 = 1 then 'kalau tekan OK
end
endif ' kalau tekan butang cancel ...nothin happen
End Sub
(c) Belajar Visual Basic
WP theme by | Courtesy of Piercing, Converted to BLOGGER by BloggerThemes.Net
0 comments:
Catat Ulasan