PDA

View Full Version : text box



ashgull80
08-06-2007, 03:43 PM
hi
i have a userform with a text box in it, but i would like it to display data from a cell in a ws rather than the user typing data in to it, is this possible?
thanks ash

Bob Phillips
08-06-2007, 03:51 PM
Private Sub Userform_Activate()

Me.TextBox1.Text = Worksheets("Sheet1").Range("A1").Text
End Sub

rory
08-07-2007, 02:11 AM
You can also set the controlsource of the textbox to the address of the cell you want. Set the textbox's Locked property to True if you don't want the user changing the contents of the cell.
Reegards,
Rory

ashgull80
08-07-2007, 09:15 AM
thanks very much both of u, good job!