I have a form that I use to collect information regarding pesticide residues in produce. I want to use VBA to create the following string, but I haven't figured out how to line things up so that it looks like everything is aligned. Here is an example of what I'm trying to accomplish in a cell B10 (for example):
Apples: Imidicloprid ............065ppm./100ml
...........Chlorantraniliprole....47ppm.../100ml
...........Fludioxynil...............25ppm.../100ml
(without the dots...)
However, it winds up looking like this:
Apples: Imidicloprid .065 /100ml
Chlorantraniliprole .47 /100ml
Fludioxynil .25ppm /100ml
I've tried:
strComment= me.txtcrop & space(15-len(me.txtcrop)) & me.txtchemical & space(25-len(me.txtchemical) _
& me.txtResidue
Is there a way to create a text string in VBA that creates columns of data?
Apples: Imidicloprid ............065ppm./100ml
...........Chlorantraniliprole....47ppm.../100ml
...........Fludioxynil...............25ppm.../100ml
(without the dots...)
However, it winds up looking like this:
Apples: Imidicloprid .065 /100ml
Chlorantraniliprole .47 /100ml
Fludioxynil .25ppm /100ml
I've tried:
strComment= me.txtcrop & space(15-len(me.txtcrop)) & me.txtchemical & space(25-len(me.txtchemical) _
& me.txtResidue
Is there a way to create a text string in VBA that creates columns of data?
Last edited: