ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying data from a listbox to a textbox (https://www.excelbanter.com/excel-programming/355076-copying-data-listbox-textbox.html)

Kevin Vaughn

Copying data from a listbox to a textbox
 
I am using a userform where I have listboxes just for displaying data that
was previously entered through a textbox. I have been entering dates, and
now find that I also need to enter times. I have dates in the listboxes
which I would love to be able to copy/paste (using cntl-c and cntl-v) to the
text box so that I could just add a space and then the time (different times
so a global search/replace option wouldn't work.)

I have tried selecting the data in the listbox and doing cntl-c and going to
the textbox and hitting cntl-v, but the data is not pasted. I know I can
paste to the textbox as I went to a different application, copied some data
and succesfully pasted.

I looked through the different properties for the listbox, and searched
through help, but I did not see an option that would allow a copy to work.
Does anyone know a way of making the copy/paste work? Thanks.
--
Kevin Vaughn

Kevin Vaughn

Copying data from a listbox to a textbox
 
I guess I should have mentioned that I actually have 24 listboxes that could
have multiple lines of data (seperated by char(13), and I would want to be
able to just select one line from any of those listboxes. I would think that
if there is a solution for one listbox, I would be able to apply that
solution to all of the listboxes. Not that I think this would matter, but it
is actually a multipage form (with 3 pages) and 24 listboxes on each.
--
Kevin Vaughn


"Kevin Vaughn" wrote:

I am using a userform where I have listboxes just for displaying data that
was previously entered through a textbox. I have been entering dates, and
now find that I also need to enter times. I have dates in the listboxes
which I would love to be able to copy/paste (using cntl-c and cntl-v) to the
text box so that I could just add a space and then the time (different times
so a global search/replace option wouldn't work.)

I have tried selecting the data in the listbox and doing cntl-c and going to
the textbox and hitting cntl-v, but the data is not pasted. I know I can
paste to the textbox as I went to a different application, copied some data
and succesfully pasted.

I looked through the different properties for the listbox, and searched
through help, but I did not see an option that would allow a copy to work.
Does anyone know a way of making the copy/paste work? Thanks.
--
Kevin Vaughn


Kevin Vaughn

Copying data from a listbox to a textbox
 
argh. That should be char(10) (just in case it matters.)
--
Kevin Vaughn


"Kevin Vaughn" wrote:

I guess I should have mentioned that I actually have 24 listboxes that could
have multiple lines of data (seperated by char(13), and I would want to be
able to just select one line from any of those listboxes. I would think that
if there is a solution for one listbox, I would be able to apply that
solution to all of the listboxes. Not that I think this would matter, but it
is actually a multipage form (with 3 pages) and 24 listboxes on each.
--
Kevin Vaughn


"Kevin Vaughn" wrote:

I am using a userform where I have listboxes just for displaying data that
was previously entered through a textbox. I have been entering dates, and
now find that I also need to enter times. I have dates in the listboxes
which I would love to be able to copy/paste (using cntl-c and cntl-v) to the
text box so that I could just add a space and then the time (different times
so a global search/replace option wouldn't work.)

I have tried selecting the data in the listbox and doing cntl-c and going to
the textbox and hitting cntl-v, but the data is not pasted. I know I can
paste to the textbox as I went to a different application, copied some data
and succesfully pasted.

I looked through the different properties for the listbox, and searched
through help, but I did not see an option that would allow a copy to work.
Does anyone know a way of making the copy/paste work? Thanks.
--
Kevin Vaughn



All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com