User form Default value in text box

  • Thread starter AccessUser777 via OfficeKB.com
  • Start date
A

AccessUser777 via OfficeKB.com

Hi all.
Quick question. I have a user form in excel which has a text box which i want
to have the value defaulted to the current date. I've looked at several
posting on this site but haven't gotten it to work yet. Any ideas on how to
set the text box with the current date as a default value? Any help or
direction is appreciated. Thanks.
 
M

Mike H

Hi,

Try this way

Private Sub UserForm_Activate()
TextBox1.Text = Date
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top