Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox date "oddity"
Hello all.
I have an odd one here and hoping someone has encountered this before. I have a form that will hold various user input (name, course name, date taken, score, percentage score and expiry dates) and has a SPIN button on it that allows the user to "scroll" through various records. When the user is finished entering their information, it will automatically put this information into the proper columns. On one of my multipages of this form I have 10 courses listed like below; (Checkbox) Course name, (Textbox) Course date, (Textbox) Score etc. Repeat X10 The problem I'm having is with the date information that gets populated into the course date text box holders when the form initializes AND when using the SPIN control. For the first 9 of them there is no problem, however for the last one, it does not nor will not share the same displayed format. Date boxes 1-9 display "02/Dec/2007" but the last one displays "12/Feb/ 2007" and the odd thing is, when I click on the spinbutton control to browse other people's course dates, it will continue to show 12/Feb/ 2007 but advances by one month (instead of the actual day) up too number 12 THEN it starts to advance by the day. Just to clarify, I have entered the same information into the first 12 of my student files and with a number so when i click on the spin button and am at say record number 7, all the fields will display an entry and number 7 so that I know that the information is accurate and "inline". Some of the code for clicking on the spinbrowse button; Private Sub spnBrowse_Change() ''''Note** It seems that whatever is at the END of the variable list below will not display properly!!!??? Dim EvalBSTdate, EVALRetakeDate, PatrolDate, CprDate, IndustrialDate, cc1OpenDate, PropaneDate, PublicDate, ReportDate, ResidentialDate, retailDate, SiteTraining As Date ''''Some examples of the code that goes populates the date text boxes upon spin button change PatrolDate = Application.WorksheetFunction.VLookup(spnBrowse.Va lue, CoreComp1, 5, False) txtPatrolDate = PatrolDate txtPatrolDate = Format(txtPatrolDate.Text, "DD/MMM/YYYY") CprDate = Application.WorksheetFunction.VLookup(spnBrowse.Va lue, CoreComp1, 11, False) txtCPRDate = CprDate txtCPRDate = Format(txtCPRDate.Text, "DD/MMM/YYYY") IndustrialDate = Application.WorksheetFunction.VLookup(spnBrowse.Va lue, CoreComp1, 17, False) txtIndustrialDate = IndustrialDate txtIndustrialDate = Format(txtIndustrialDate.Text, "DD/MMM/YYYY") Hope that was enough detail to help with this issue. Any input would be appreciated thanks. -Imonit |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
=EMBED("Forms.TextBox.1","") | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
Textbox date "oddity" | Excel Programming | |||
Excel VBA to convert "dd.MM.yy" text to "dd/MM/yyyy" format date? | Excel Programming | |||
Can you Click the "Enter" key to go to the next line in a Textbox without Exiting the Textbox ? | Excel Programming |