Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading data from a cell to a text box

Userform.txtDiameter.Caption = Cells(2, 3).Value

should do the trick
/roger

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 205
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Data from another workbook... depending on variable in a cell? Rob Moyle Excel Discussion (Misc queries) 4 March 13th 06 04:21 PM
reading data from a range into a cell brya6347[_2_] Excel Programming 1 February 17th 05 05:32 AM
Reading more than one set of data from a single cell Broadsider Excel Programming 2 November 14th 04 09:50 PM
reading data from com port into 2 different cell locations. Neil K Excel Programming 0 September 30th 04 12:26 PM
reading data from text files in VBA Arne[_3_] Excel Programming 3 January 27th 04 10:07 AM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"