R
RoVo
I have a userform that outputs selected checkboxes captions to a new
word document. The captions are pulled from a table. However, if a
checkbox is selected that has no caption because of a blank field in
the table, it still writes a blank line. Its not a big deal, but the
end result is unattractive. Ive tried to write code that tests to see
if the caption is empty, then dont write to the new file. But I have
had varied results.
For example, something like this:
If CheckBox1.Caption <> Null And Checkbox1.Value = True then
<code to write to file>
End If
This prevents a checked blank line from writing to the file, but it
also prevents fields that have text in them from writing too.
If CheckBox1.Caption <> "" And Checkbox1.Value = True then
<code to write to file>
End If
This writes all fields selected regardless if there is anything in
them or not.
Any help recieved would be greatly appreciated.
Rob
word document. The captions are pulled from a table. However, if a
checkbox is selected that has no caption because of a blank field in
the table, it still writes a blank line. Its not a big deal, but the
end result is unattractive. Ive tried to write code that tests to see
if the caption is empty, then dont write to the new file. But I have
had varied results.
For example, something like this:
If CheckBox1.Caption <> Null And Checkbox1.Value = True then
<code to write to file>
End If
This prevents a checked blank line from writing to the file, but it
also prevents fields that have text in them from writing too.
If CheckBox1.Caption <> "" And Checkbox1.Value = True then
<code to write to file>
End If
This writes all fields selected regardless if there is anything in
them or not.
Any help recieved would be greatly appreciated.
Rob