Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I have a TextBox that needs to display in a date format and a CommandButton that needs to advance this date by 1 day every time it is clicked. The first question is how to get TextBox1 to display a date format (mmm/dd/yyyy)? The second question is how to advance this date with a CommandButton (the button is called NextDateButton)? Any help would be appreciated. TIA -Minitman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You have not said were the text box is on a sheet or a dilaog box for a sheet this gives todays date Sheets(1).TextBox1.Text = Format(Now(), "dd/mm/yyyy") this adds 1 to the date in the text box Sheets(1).TextBox1.Text = Format(DateValue(Sheets(1). _ TextBox1.Text) + 1, "dd/mm/yyyy" -- mudrake ----------------------------------------------------------------------- mudraker's Profile: http://www.excelforum.com/member.php...nfo&userid=247 View this thread: http://www.excelforum.com/showthread.php?threadid=27140 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry, this TextBox is on a UserForm.
I modified your code thus: TextBox1.Text = Format(DateValue(TextBox1.Text) + 1, "mmm/dd/yyyy") And placed it in the code of the "Next" button. It works very well. Thank you. -Minitman On Thu, 21 Oct 2004 20:58:55 -0500, mudraker wrote: You have not said were the text box is on a sheet or a dilaog box for a sheet this gives todays date Sheets(1).TextBox1.Text = Format(Now(), "dd/mm/yyyy") this adds 1 to the date in the text box Sheets(1).TextBox1.Text = Format(DateValue(Sheets(1). _ TextBox1.Text) + 1, "dd/mm/yyyy") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I insert a date that is always 7 days in advance of today | Excel Discussion (Misc queries) | |||
Textbox to show date | Excel Discussion (Misc queries) | |||
how to creat a formula to advance date by one year | Excel Worksheet Functions | |||
can excel flagup in advance of a date, say 6 weeks | Excel Discussion (Misc queries) | |||
converting date from a textbox to a date format | Excel Programming |