i have a few checklist box in my excel sheet (say A-F i.e., caption of checkbox),based on the enabling of check list, i have to generate hex value...does the below code will do it.
Private Sub CommandButton1_Click()
Dim SegArray(15) As Integer
For i = 0 To 13
If CheckBox(i).Value = True Then
SegArray(i) = 1
Else
SegArray(i) = 0
End If
Next i
hex_value = Hex(SegArray())
MsgBox "0x" & hex_value
End Sub
i got an error:
compile error: sub or function isnt defined