Good afternoon,
I'm a little stumped about the results I'm getting. I have the following code:
Private Sub cbSave_Click() 'Saving input results to master data sheet
Dim NextInputRow As Range
Set NextInputRow = ActiveWorkbook.Sheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0)
NextInputRow.Value = Sheets("Sheet1").Range("SurveyID").Value
NextInputRow.Offset(0, 1).Value = Range("Q1_Resp").Value * 1 'Multiply by 1 to force to integer
NextInputRow.Offset(0, 2).Value = Range("Q2_Resp").Value * 1
NextInputRow.Offset(0, 3).Value = Range("Q3_Resp").Value * 1
End Sub
I thought by multipling a True / False value by 1 I would convert a True to 1 and a False to 0. However, instead I get a -1 for the True responses. Does anyone now where the negative is coming from?
Thanks for any help.
Crystal
I'm a little stumped about the results I'm getting. I have the following code:
Private Sub cbSave_Click() 'Saving input results to master data sheet
Dim NextInputRow As Range
Set NextInputRow = ActiveWorkbook.Sheets("Sheet2").Range("A65536").End(xlUp).Offset(1, 0)
NextInputRow.Value = Sheets("Sheet1").Range("SurveyID").Value
NextInputRow.Offset(0, 1).Value = Range("Q1_Resp").Value * 1 'Multiply by 1 to force to integer
NextInputRow.Offset(0, 2).Value = Range("Q2_Resp").Value * 1
NextInputRow.Offset(0, 3).Value = Range("Q3_Resp").Value * 1
End Sub
I thought by multipling a True / False value by 1 I would convert a True to 1 and a False to 0. However, instead I get a -1 for the True responses. Does anyone now where the negative is coming from?
Thanks for any help.
Crystal