Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading data from a cell to a text box
Hi All, I have a user form with a number of text boxes. How do you read data from a cell in a workbook to the text box in the user form? The text box is called txtDiameter and I assumed the code would be quite simple and tried the following: txtDiameter = Cells(2, 3).Value txtDiameter on the user form remins blank. Does any body have any ideas? Best Regards, Aaron -- Aaron1978 ------------------------------------------------------------------------ Aaron1978's Profile: http://www.excelforum.com/member.php...o&userid=31201 View this thread: http://www.excelforum.com/showthread...hreadid=519726 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading data from a cell to a text box
Userform.txtDiameter.Caption = Cells(2, 3).Value
should do the trick /roger |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading data from a cell to a text box
Hi Aaron,
You've got the reference to the object (txtDiameter). You just need to set its 'Value' property, so: txtDiameter.Value = Cells(2, 3).Value Best regards John "Aaron1978" wrote in message ... Hi All, I have a user form with a number of text boxes. How do you read data from a cell in a workbook to the text box in the user form? The text box is called txtDiameter and I assumed the code would be quite simple and tried the following: txtDiameter = Cells(2, 3).Value txtDiameter on the user form remins blank. Does any body have any ideas? Best Regards, Aaron -- Aaron1978 ------------------------------------------------------------------------ Aaron1978's Profile: http://www.excelforum.com/member.php...o&userid=31201 View this thread: http://www.excelforum.com/showthread...hreadid=519726 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reading data from a cell to a text box
Thanks for your help guys. Worked fine. -- Aaron1978 ------------------------------------------------------------------------ Aaron1978's Profile: http://www.excelforum.com/member.php...o&userid=31201 View this thread: http://www.excelforum.com/showthread...hreadid=519726 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Reading Data from another workbook... depending on variable in a cell? | Excel Discussion (Misc queries) | |||
reading data from a range into a cell | Excel Programming | |||
Reading more than one set of data from a single cell | Excel Programming | |||
reading data from com port into 2 different cell locations. | Excel Programming | |||
reading data from text files in VBA | Excel Programming |