APOLLO
January 14th, 2000, 10:55 AM
I'M NEW TO VISUAL BASIC, I HAVE A FORM WITH 12 CHECK BOXES NUMBERED 1 - 12 I NEED A RESULT BOX TO DISPLAY WHICH NUMBERS I HAVE CLICKED AND A WAY TO STORE THESE RESULTS CAN SOMEONE HELP ME
|
Click to See Complete Forum and Search --> : CHECK BOX APOLLO January 14th, 2000, 10:55 AM I'M NEW TO VISUAL BASIC, I HAVE A FORM WITH 12 CHECK BOXES NUMBERED 1 - 12 I NEED A RESULT BOX TO DISPLAY WHICH NUMBERS I HAVE CLICKED AND A WAY TO STORE THESE RESULTS CAN SOMEONE HELP ME Aaron Young January 14th, 2000, 11:23 AM private Sub cmdResults_Click() Dim oControl as Control Dim sResult as string for Each oControl In Controls If TypeOf oControl is CheckBox then If oControl.Value then sResult = sResult & ", " & oControl.Name End If next MsgBox "You Checked; " & mid$(sResult, 3) End Sub You could store the Result(s) in the Registry using the VB Functions GetSetting() and SaveSetting() Aaron Young Analyst Programmer ajyoung@pressenter.com aarony@redwingsoftware.com codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |