B
Billy Smith
I have a form that does a query, processes the records
using VBA, and produces some rows and columns of data
as output. In addition to seeing the results on the form,
my users like to be able to cut and paste the data from
the form to an Excel spreadsheet.
I just wrote the code to put my output into a list box
only to find that I can't cut and paste from a list box.
Even with the Multiselect property set to "Extended",
cut and paste captures only one column of data.
I know a datasheet subform would let me cut and paste but
they're set up for data from queries or tables and I
don't know how to feed data into a datasheet subform
from VBA. I guess I could try writing the output to
a text box but I don't think that will handle the
columns very well.
Questions:
1) Is there an easy way to make the list box let me
cut and paste it's entire contents?
2) If not, how can I write data to a datasheet subform
from VBA code?
3) Any other ideas?
I'm doing this in Access 2000.
Thanks.
using VBA, and produces some rows and columns of data
as output. In addition to seeing the results on the form,
my users like to be able to cut and paste the data from
the form to an Excel spreadsheet.
I just wrote the code to put my output into a list box
only to find that I can't cut and paste from a list box.
Even with the Multiselect property set to "Extended",
cut and paste captures only one column of data.
I know a datasheet subform would let me cut and paste but
they're set up for data from queries or tables and I
don't know how to feed data into a datasheet subform
from VBA. I guess I could try writing the output to
a text box but I don't think that will handle the
columns very well.
Questions:
1) Is there an easy way to make the list box let me
cut and paste it's entire contents?
2) If not, how can I write data to a datasheet subform
from VBA code?
3) Any other ideas?
I'm doing this in Access 2000.
Thanks.