ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy cells to a txtbox (https://www.excelbanter.com/excel-programming/357328-copy-cells-txtbox.html)

SMERTZ

Copy cells to a txtbox
 
I am creating a user form to display data that is hard to read in a
spreadsheet. The sheet will have about 20 cells of data in each row, so this
may be very simple but what process can I use to grab the current row, or
even start at row 2 and paste cells into text boxes.

Then the next problem I will put a NEXT button on the form to move one row
down and then grab the data in those 20 cells

There must be a better way than the following:
txtOrginazation.Value = Worksheets("Open projects").Range("A2").Value
txtDate.Value = Worksheets("Open projects").Range("B2").Value
txtET.Value = Worksheets("Open projects").Range("C2").Value

Thanks for any input.



Henrich

Copy cells to a txtbox
 
Hi, I'm putting data from cells into textbox this way:

x=range("A2").text
Textbox1.text=x

If you wann to put datas from more the one cell into same textbox then use
for next cell:
Textbox1.text=Textbox1.text & x 'where x is the text from another cell for
example A3

Henrich

€žSMERTZ" napÃ*sal (napÃ*sala):

I am creating a user form to display data that is hard to read in a
spreadsheet. The sheet will have about 20 cells of data in each row, so this
may be very simple but what process can I use to grab the current row, or
even start at row 2 and paste cells into text boxes.

Then the next problem I will put a NEXT button on the form to move one row
down and then grab the data in those 20 cells

There must be a better way than the following:
txtOrginazation.Value = Worksheets("Open projects").Range("A2").Value
txtDate.Value = Worksheets("Open projects").Range("B2").Value
txtET.Value = Worksheets("Open projects").Range("C2").Value

Thanks for any input.





All times are GMT +1. The time now is 04:50 PM.

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