Question:
Visual Basic question?
2007-02-19 09:46:08 UTC
I need help with this:
I have created five checkboxes with caption A, B, C, D, e respectively. As the user are finished with clicking on any of those checkboxes, then need to click a commandbutton. Then the captions of the checkboxes they selected should be displayed in a list?

What is the code for this?

And what is the code to display the date and time?

* 10 pts for a good answer
Three answers:
Richard H
2007-02-19 13:53:19 UTC
What Version VB... .NET or previous? Check out http://www.pscode.com for great sample codes.
salin s
2007-02-19 18:52:46 UTC
design time make command buttons enabled property false

write the code below in check box's click event

command1.enabled=true

write the code below in command buttons click event

List1.AddItem (Check1.Caption)

check with if condition for each check box

eg

if check1.value=1 then

List1.AddItem (Check1.Caption)

elseif check2.value=1

etc

for time and date

List1.AddItem (Time)

List1.AddItem (date)

you can see the time like a clock by using timer

try with this and make further improvements withyour own logic

you can do that

good luck
rod
2007-02-19 17:58:38 UTC
IF chkBoxA.checked = True THEN

List1.addItem (chkBoxA.caption)

End If



txtBoxDateTime = Now()


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...