Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Current Date Code in form

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Current Date Code in form

This will give you the current date:

=TODAY()

and if you want to force the format:

=TEXT(TODAY(),"mm/dd")

However, it wil change every time you open the file on a new day.

Hope this helps.

Pete

On Sep 21, 1:55*pm, Tony wrote:
I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Current Date Code in form

Pete, here is the resot of the code with your suggestion near the bottom
which returns a "compile error".

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAddress"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationCity"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationPostalCode"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationBN9Number"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAssignedCollectorName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationMORNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationFileNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationTradeName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndLastName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationStatuteType"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAmountOwing"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN2"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationExtraMVs"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndLastName"
Selection.ClearContents
LienRegistrationForm.Show
'ProcessDate = Now
ProcessDate = Text(TODAY(), "mm/dd")
Sheets("Menu").Select
End If
End Sub

"Pete_UK" wrote:

This will give you the current date:

=TODAY()

and if you want to force the format:

=TEXT(TODAY(),"mm/dd")

However, it wil change every time you open the file on a new day.

Hope this helps.

Pete

On Sep 21, 1:55 pm, Tony wrote:
I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Current Date Code in form

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Current Date Code in form

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Current Date Code in form

Note Jacob's reply.

In VBA Format is equivalent to =TEXT, and Date is equivalent to =TODAY
() in worksheet formulae.

Pete

On Sep 21, 2:23*pm, Tony wrote:
Pete, here is the resot of the code with your suggestion near the bottom
which returns a "compile error".

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
* * Dim nResult As Long
* * resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
* * If resp = vbYes Then
* * Application.Goto Reference:="NFNRRegistrationBusinessName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationAddress"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationCity"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationPostalCode"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationIndDOB"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationBN9Number"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationAssignedCollectorName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationMORNumber"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationFileNumber"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationTradeName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationIndName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationIndInitial"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationIndLastName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationStatuteType"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationAmountOwing"
* * Selection.ClearContents
* * *Application.Goto Reference:="NFNRMVYear1"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVMake1"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVModel1"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVVIN1"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVYear2"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVMake2"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVModel2"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRMVVIN2"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistrationExtraMVs"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistration2ndIndDOB"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistration2ndIndName"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistration2ndIndInitial"
* * Selection.ClearContents
* * Application.Goto Reference:="NFNRRegistration2ndIndLastName"
* * Selection.ClearContents
* * LienRegistrationForm.Show
* * 'ProcessDate = Now
* * ProcessDate = Text(TODAY(), "mm/dd")
* * Sheets("Menu").Select
* * End If
End Sub



"Pete_UK" wrote:
This will give you the current date:


=TODAY()


and if you want to force the format:


=TEXT(TODAY(),"mm/dd")


However, it wil change every time you open the file on a new day.


Hope this helps.


Pete


On Sep 21, 1:55 pm, Tony wrote:
I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Current Date Code in form

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Current Date Code in form

How do I use TODAY() to get today's date to appear int he textbox?

"Jacob Skaria" wrote:

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Current Date Code in form

So you havent tried that right...In VBA Date returns current date..

TODAY() is a worksheet function and not a vBA


If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

How do I use TODAY() to get today's date to appear int he textbox?

"Jacob Skaria" wrote:

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Current Date Code in form

Tried it like this which doesn't show the current date on the form when it
opens.

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAddress"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationCity"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationPostalCode"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationBN9Number"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAssignedCollectorName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationMORNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationFileNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationTradeName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndLastName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationStatuteType"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAmountOwing"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN2"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationExtraMVs"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndLastName"
Selection.ClearContents
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

"Jacob Skaria" wrote:

So you havent tried that right...In VBA Date returns current date..

TODAY() is a worksheet function and not a vBA


If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

How do I use TODAY() to get today's date to appear int he textbox?

"Jacob Skaria" wrote:

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 313
Default Current Date Code in form

Jacob, I am not sure why, but now it works. Didn't make any changes from the
code I just showed you but it works. Thanks so much for your patience.

Tony

"Tony" wrote:

Tried it like this which doesn't show the current date on the form when it
opens.

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAddress"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationCity"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationPostalCode"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationBN9Number"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAssignedCollectorName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationMORNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationFileNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationTradeName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndLastName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationStatuteType"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAmountOwing"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN2"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationExtraMVs"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndLastName"
Selection.ClearContents
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

"Jacob Skaria" wrote:

So you havent tried that right...In VBA Date returns current date..

TODAY() is a worksheet function and not a vBA


If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

How do I use TODAY() to get today's date to appear int he textbox?

"Jacob Skaria" wrote:

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Current Date Code in form

Tony, Good to hear; it worked

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

Jacob, I am not sure why, but now it works. Didn't make any changes from the
code I just showed you but it works. Thanks so much for your patience.

Tony

"Tony" wrote:

Tried it like this which doesn't show the current date on the form when it
opens.

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAddress"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationCity"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationPostalCode"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationBN9Number"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAssignedCollectorName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationMORNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationFileNumber"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationTradeName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationIndLastName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationStatuteType"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationAmountOwing"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN1"
Selection.ClearContents
Application.Goto Reference:="NFNRMVYear2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVMake2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVModel2"
Selection.ClearContents
Application.Goto Reference:="NFNRMVVIN2"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistrationExtraMVs"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndDOB"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndName"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndInitial"
Selection.ClearContents
Application.Goto Reference:="NFNRRegistration2ndIndLastName"
Selection.ClearContents
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

"Jacob Skaria" wrote:

So you havent tried that right...In VBA Date returns current date..

TODAY() is a worksheet function and not a vBA


If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

How do I use TODAY() to get today's date to appear int he textbox?

"Jacob Skaria" wrote:

'I hope processdate text box is on the form. If so
LienRegistrationForm.Show
LienRegistrationForm.ProcessDate.Text = Format(Date, "mm/dd")


OR use the form initialize event and assign the text box with date as below


Private Sub UserForm_Initialize()
ProcessDate.Text = Format(Date, "mm/dd")
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"GTReferee" wrote:

The date is not showing in the form. Also, after the form shows I get a
Runtime 424 error. Here is the code I am using with your suggestion:

Private Sub LienRegistration_Click()
Application.ScreenUpdating = False
Dim nResult As Long
resp = MsgBox(Prompt:="Do you want to clear values?", Buttons:=vbYesNo)
If resp = vbYes Then
Application.Goto Reference:="NFNRRegistrationBusinessName"
Selection.ClearContents
LienRegistrationForm.Show
ProcessDate.Text = Format(Date, "mm/dd")
Sheets("Menu").Select
End If
End Sub

--
GTReferee


"Jacob Skaria" wrote:

ProcessDate.Text = Format(Date,"mm/dd")

If this post helps click Yes
---------------
Jacob Skaria


"Tony" wrote:

I want to have the current date to appear in a form formatted as mm/dd. The
textbox name is ProcessDate.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to resize Data, form with current wksht information RennieMay Excel Worksheet Functions 1 July 13th 07 09:22 AM
Figuring Vacation Hrs. Earned using Current Date minus Hire Date Sharon Excel Worksheet Functions 6 May 3rd 07 10:32 PM
DATE IN TEXT FORM - NEED TO CHANGE IT DATE FORM SSJ New Users to Excel 3 October 27th 06 08:34 PM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"