ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userform textbox returns changeable date (https://www.excelbanter.com/excel-programming/448478-userform-textbox-returns-changeable-date.html)

Taja

userform textbox returns changeable date
 
I'm trying to get a userform textbox to show the current date when the form is loaded. However, the user still has to be able to edit it to a different date if they need to.

GS[_2_]

userform textbox returns changeable date
 
I'm trying to get a userform textbox to show the current date when
the form is loaded. However, the user still has to be able to edit it
to a different date if they need to.


Sooo.., what's your question?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



Taja

userform textbox returns changeable date
 
Is there some mode that the userform textbox needs to be in for the user to be able to change it even if there is already a date in the textbox?


GS[_2_]

userform textbox returns changeable date
 
Is there some mode that the userform textbox needs to be in for the
user to be able to change it even if there is already a date in the
textbox?


Obviously.., you haven't run your userform have you? A textbox is a
user input control and so doesn't need any special treatment to be used
as such.

Run the userform! Try it out!

Sub Userform_Initialize()
Me.TextBox1.Text = Date 'today's date
End Sub

When it displays, change the textbox contents however you like!

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



Mahal

userform textbox returns changeable date
 
You're right. Sorry, bit of an amateur here.



All times are GMT +1. The time now is 12:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com