View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_666_] Leith Ross[_666_] is offline
external usenet poster
 
Posts: 1
Default Reading Data from a Cell to a text box-user forms


Hello Mandle,

The code you have is correct but not the references. It needs to be
placed in the TextBox's Activate event procedure.

1) Copy the code below using CTRL+C.
2) Open the Workbook you will using the code in.
3) Press ALT+F11 to open the VBA Editor.
4) Click on the + (plus sign) next to Forms in the Project Explorer to
display the forms in your project if they aren't listed.
5) Double Click TextBox 70.
6) Place the blinking cursor at the top left side of the listed code.
7) Press CTRL+V to paste it in.
8) Press CTRL+S to Save the changes.
9) Press ALT+Q to return to Excel.


Code:
--------------------

Private Sub UserForm_Activate
TextBox70.Value = Sheets("Index").Range("B2").Value
End Sub

--------------------


Sincerely.
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=562314