View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Userform reading a cell value

Hi Rich

One way

You can use this to fill the textbox with the value of cell A1
It will run when you open the userform

Place this in the Userform module

Private Sub UserForm_Initialize()
Me.TextBox1.Value = ThisWorkbook.Sheets("Sheet1").Range("a1").Value
End Sub

You can also place this line in the click event off a button
Me.TextBox1.Value = ThisWorkbook.Sheets("Sheet1").Range("a1").Value


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Rich" wrote in message ...
Is it possible to have a userform read a spreadsheet cell
value and on the same userform giving the operator two
buttons. Such as continue or cancel the form? If so how
do I get the cell value to appear in the userform?
Any help would be appreciated.
Thanks!
Rich