Posting Current Days Date in VBA Text Box


Posted by Ken on May 08, 2000 9:15 AM

Would like to Post Current Days Date in VBA textbox txtDate. VBA will not allow me to enter a formula such as =Now() or =Today() in the textbox, despite fact that the formula evaluates in a cell.



Posted by ivan moala on May 08, 2000 1:55 PM

Ken
The textbox as a ActiveX component has its own
properties and Methods same as a cell. The display
for a cell depends on the format property of
that cell. All the textbox will pick up (assuming
you have it linked to a cell) is the Value.
To get the Textbox to display the Date format
try someting like;
TextBox1 = Format(yourdateData,"mm-dd-yy")

Ivan