Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm TextBox
Hi,
I've got a userform with a text box on it, and some comand buttons that move active cell left or right, How do I program the text box to display the value the active cell offset by 2 rows, the value happens to be a date. Thanks for any help. Regards Laddie. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm TextBox
Assuming your controls are named with the default names VBA assigns, use
this... Private Sub Worksheet_SelectionChange(ByVal Target As Range) With UserForm1 If .Visible = True Then .TextBox1.Value = ActiveCell.Offset(2, 0).Value End If End With End Sub in the worksheet code window (**not** the user form code window). Rick "LaDdIe" wrote in message ... Hi, I've got a userform with a text box on it, and some comand buttons that move active cell left or right, How do I program the text box to display the value the active cell offset by 2 rows, the value happens to be a date. Thanks for any help. Regards Laddie. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm TextBox
Thanks Rick, Just the job, The rest I can tweak
Regards LaDdIe "Rick Rothstein (MVP - VB)" wrote: Assuming your controls are named with the default names VBA assigns, use this... Private Sub Worksheet_SelectionChange(ByVal Target As Range) With UserForm1 If .Visible = True Then .TextBox1.Value = ActiveCell.Offset(2, 0).Value End If End With End Sub in the worksheet code window (**not** the user form code window). Rick "LaDdIe" wrote in message ... Hi, I've got a userform with a text box on it, and some comand buttons that move active cell left or right, How do I program the text box to display the value the active cell offset by 2 rows, the value happens to be a date. Thanks for any help. Regards Laddie. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Userform TextBox | Excel Programming | |||
Userform textbox help | Excel Programming | |||
Userform textbox help | Excel Programming | |||
Textbox in userform | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |