Bhavesh Vankar

Bhavesh Vankar

  • 755
  • 1.2k
  • 89.3k

select block no using checkbox and no should be display in textbox

Mar 24 2021 11:24 AM
 i want to select block no and display it in textbox in ascending but one issue is interupt me is checkboxlist. in visual basic 6.0 only have check1, check2 etc... not checkboxlist. in this case what to do. 
 
1)  if checkbox is selected the selected checkbox value should be display in Textbox.
 
2)  second one is when i select 1 to 7 from combobox or dropdown then checkbox from 1 to 7 should be select 
 
i have tried for dropdown as per below code its working in VS2015 but not in VB6.0.
 
kindly suggest me...
  1. Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged  
  2.        If ComboBox1.Text = "1 To 7" Then  
  3.            CheckBox1.Checked = True  
  4.            CheckBox2.Checked = True  
  5.            CheckBox3.Checked = True  
  6.            CheckBox4.Checked = True  
  7.            CheckBox5.Checked = True  
  8.            CheckBox6.Checked = True  
  9.        Else  
  10.            CheckBox1.Checked = False  
  11.            CheckBox2.Checked = False  
  12.            CheckBox3.Checked = False  
  13.            CheckBox4.Checked = False  
  14.            CheckBox5.Checked = False  
  15.            CheckBox6.Checked = False  
  16.        End If  
  17.    End Sub  
 
 

Answers (3)