Having some trouble using a checkbox. Tried both Form Field and Control Tool checkboxes
Code that is giving me trouble is
Case 1 'Amended
If Amended.Value = vbChecked Then
MyStr = MyStr & "Y"
Else
MyStr = MyStr & "N"
End If
This is a snipet of a large piece of code. There are 15 different case results. This code takes a bunch of fields from my spreadsheet concatenates them into a long text string (MyStr) then outputs this string to a text file. I have a control Tool Check box named Amended. I just need to insert a Y or N into my text string depending on if this box is checked or not. All of the rest of the cases work just fine. I just can't seem to GET the value of this checkbox.
Am I not declaring something? This results is always false! Regardless if checked or not.
TIA
Code that is giving me trouble is
Case 1 'Amended
If Amended.Value = vbChecked Then
MyStr = MyStr & "Y"
Else
MyStr = MyStr & "N"
End If
This is a snipet of a large piece of code. There are 15 different case results. This code takes a bunch of fields from my spreadsheet concatenates them into a long text string (MyStr) then outputs this string to a text file. I have a control Tool Check box named Amended. I just need to insert a Y or N into my text string depending on if this box is checked or not. All of the rest of the cases work just fine. I just can't seem to GET the value of this checkbox.
Am I not declaring something? This results is always false! Regardless if checked or not.
TIA