Excel Form Date format

eddiesvoicebox

New Member
Joined
Nov 19, 2004
Messages
10
Afternoon All (Depending On Where You Are Of Course)

I have a small issue with a date format in my Excel 2002 forms. When i select a date from a drop down list (formatted as date in excel sheet) the form shows the number value for that date not the date itself. I am aware how to format the date in normal worksheets but unaware of how to do this for a form field. Please help as its been bugging me all morning.

Below is the code when the field changes.

Private Sub CBPrposedDate_Change()
Call dater
End Sub

Sub dater()
Dim banana As Date
If FRMAgent_Details.CBAreaOfBus = "Sales" Then
banana = FRMAgent_Details.CBPrposedDate.Text
Sheets("InputForm").Select
Range("u2").Select
Do Until ActiveCell.Value = banana
ActiveCell.Offset(1, 0).Select
Loop
FRMAgent_Details.TBRequestDate.Text = ActiveCell.Offset(0, 3).Value
banana1 = FRMAgent_Details.TBRequestDate.Text
Sheets("Main").Select
Else
banana = FRMAgent_Details.CBPrposedDate.Text
Sheets("InputForm").Select
Range("u2").Select
Do Until ActiveCell.Value = banana
ActiveCell.Offset(1, 0).Select
Loop
FRMAgent_Details.TBRequestDate.Text = ActiveCell.Offset(0, 2).Value
banana1 = FRMAgent_Details.TBRequestDate.Text
End If
End Sub


Many thanks in advance for any help you may be able to offer.

Eddiesvoicebox
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,213,497
Messages
6,113,998
Members
448,539
Latest member
alex78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top