View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
tony tony is offline
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.