Automatically displaying text in a form
Rick the text box is on a user form called from a worksheet by the user
selecting a button.
What I am trying to do is have a field on one tab on the form automatically
populated by a user entry into another text box on a different tab on the form
TIA
Dave
"Rick Rothstein" wrote:
Where is your TextBox located at... on the worksheet or on a UserForm?
--
Rick (MVP - Excel)
"Risky Dave" wrote in message
...
Jacob,
Thanks for the quick reply. unfortunately, this still isn't working - the
field that should show the date plus 8 years is still blank :-(
"Jacob Skaria" wrote:
Correction..
Me.tb8YO.Text =Format(DateAdd("yyyy",8,Me.tbDoB),"dd-mmm-yy")
If this post helps click Yes
---------------
Jacob Skaria
"Jacob Skaria" wrote:
Dave, try
Private Sub tb8YO_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Me.tb8YO.Text =Format(DateAdd("y",8,Me.tbDoB),"dd-mmm-yy")
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Risky Dave" wrote:
Hi,
I have a user form that captures information across a set of tabs.
What I would like to do is capture a date entered in one tab and
automatically display this value plus 8 years in a field on a
different tab
in the form.
The code I have (embedded into the second tab) is:
Private Sub tb8YO_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
With Me.tb8YO
.Value = tbDoB.Value.DateAdd("yyyy", 8, .Value)
.Text = Format(.Text, "dd-mmm-yy")
End With
End Sub
I assume that this is assigning the correct value to the text box
(I'm not
getting any error messages telling me otherwise), but it is not
actually
displaying the value (tbDoB.value plus 8 years) in the text box.
What am I doing wrong?
TIA
Dave
|