SOLVED

Automatisch Datum in userform

%3CLINGO-SUB%20id%3D%22lingo-sub-3089909%22%20slang%3D%22en-US%22%3EAutomatisch%20Datum%20in%20userform%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3089909%22%20slang%3D%22en-US%22%3E%3CP%3EHallo%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%3E%26nbsp%3B%20%26nbsp%3BWeet%20iemand%20hoe%20ik%20de%20datum%20automatisch%20in%20een%20userform%3C%2FFONT%3E%3CFONT%3E%20%3CFONT%3E%3CFONT%3Ekan%26nbsp%3B%3C%2FFONT%3E%3CFONT%3Elaten%20verschijnen%20in%20een%20textvak.%20%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3089909%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3089986%22%20slang%3D%22en-US%22%3ERe%3A%20Automatisch%20Datum%20in%20userform%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3089986%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1289490%22%20target%3D%22_blank%22%3E%40Marianne1111%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELaten%20we%20zeggen%20dat%20je%20een%20tekstvak%20TextBox1%20hebt.%3C%2FP%3E%0A%3CP%3EMaak%20de%20volgende%20procedure%20in%20de%20code-module%20van%20de%20userform%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-visual-basic%22%3E%3CCODE%3EPrivate%20Sub%20UserForm_Initialize()%0A%20%20%20%20Me.TextBox1%20%3D%20Date%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3090106%22%20slang%3D%22en-US%22%3ERe%3A%20Automatisch%20Datum%20in%20userform%20werkte%20allebij%20niet%20ik%20doe%20wat%20verkeerd%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3090106%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hallo 

   Weet iemand hoe ik de datum automatisch in een userform kan laten verschijnen in een textvak.

 

4 Replies
best response confirmed by Marianne1111 (Occasional Contributor)
Solution

@Marianne1111 

Laten we zeggen dat je een tekstvak TextBox1 hebt.

Maak de volgende procedure in de code-module van de userform:

Private Sub UserForm_Initialize()
    Me.TextBox1 = Date
End Sub
The basic command should be (change textbox name as needed):
Me.Textbox1.Value = date

@Hans Vogelaar 

Deze werkte bij mij