Hello all,
I am fairly new to VBA and have had limited work with checkboxes before. I have turned an Excel worksheet into a form in which users can enter data and click checkboxes. I want to record the data, including the data within the checkboxes, onto another worksheet. I am having a lot of trouble referencing, much less reading the checkboxes.
I had used the format control to reference a cell, but this is not what I want. I need to be able to create a database to hold all the information recorded. Here is some sample code.
Sub EnterData_Click ()
'Record free answer responses
Sheets("new pt data").Range("A 2") = Sheets("new pt").Range("lna me")
Sheets("new pt data").Range("B 2") = Sheets("new pt").Range("fna me")
'Record checkbox responses
Sheets("new pt data").Range("C 2") = CheckBox1.Value
'Insert row to shift all records down
Sheets("new pt data").Range("A 2").EntireRow.I nsert
End Sub
Any suggestions?
Thanks
I am fairly new to VBA and have had limited work with checkboxes before. I have turned an Excel worksheet into a form in which users can enter data and click checkboxes. I want to record the data, including the data within the checkboxes, onto another worksheet. I am having a lot of trouble referencing, much less reading the checkboxes.
I had used the format control to reference a cell, but this is not what I want. I need to be able to create a database to hold all the information recorded. Here is some sample code.
Sub EnterData_Click ()
'Record free answer responses
Sheets("new pt data").Range("A 2") = Sheets("new pt").Range("lna me")
Sheets("new pt data").Range("B 2") = Sheets("new pt").Range("fna me")
'Record checkbox responses
Sheets("new pt data").Range("C 2") = CheckBox1.Value
'Insert row to shift all records down
Sheets("new pt data").Range("A 2").EntireRow.I nsert
End Sub
Any suggestions?
Thanks
Comment