Hello. On my userform i have 2 checkboxes (Checkbox1, Checkbox2), where the data from those checkboxes are stored in columns 11 and 12 on worksheets("Data") depending on which checkbox is selected. I have an edit button (btnEdit) which is clicked after selecting a row from a listbox (Listbox1) where the data from the selected row is then edited in the corresponding textboxes.
The problem is, i'm having trouble trying to get the checkboxes check value on the userform to be checked if the row to be edited is selected.
Below is the code I have fro the edit button. Can someone help with this?
I kept on getting error messages when I added the checkboxes code below txtOtherInfo.Text
The problem is, i'm having trouble trying to get the checkboxes check value on the userform to be checked if the row to be edited is selected.
Below is the code I have fro the edit button. Can someone help with this?
Code:
Private Sub btnEdit_Click()
lblID.Caption = Me.ListBox1.List(ListBox1.ListIndex)
cboCategory.Text = Me.ListBox1.Column(1, ListBox1.ListIndex)
cboOutlet.Text = Me.ListBox1.Column(2, ListBox1.ListIndex)
txtRecieptNo.Text = Me.ListBox1.Column(3, ListBox1.ListIndex)
txtAmount. Text = Me.ListBox1.Column(4, ListBox1.ListIndex)
txtDate.Text = Me.ListBox1.Column(5, ListBox1.ListIndex)
txtOtherInfo.Text = Me.ListBox1.Column(6, ListBox1.ListIndex)
End Sub
I kept on getting error messages when I added the checkboxes code below txtOtherInfo.Text