Hi
The following code starts the Current Date and will then adjust it by a Day or so dependant on the Spin Button selection.
The problem is for the start of the month it Dispaly the date as DD/MM/YYYY. Which is fine, BUT around the 11 to 13 it swaps it format to MM/DD/YYYY in the UserForm Text Box.
Code
Private Sub UserForm_Initialize()
Call AutoFilter
TextBox1.ControlSource = Worksheets("Data").Range("J2")
TextBox1.Text = Worksheets("Data").Range("I2")
ZoneSelectCombo.SetFocus
Set ZoneRange = Range("Zones")
Nzones = ZoneRange.Rows.Count
For r = 1 To Nzones
ZoneSelectCombo.AddItem ZoneRange.Cells(r, 1)
Next r
ZoneSelectCombo.ListIndex = 0
End Sub
Private Sub SpinButton1_Change()
Dim DateAdjust As Date
adjust = OnCallTec.SpinButton1.Value
DateAdjust = DateAdd("d", adjust, OnCallTec.TextBox1.Value)
OnCallTec.TextBox1.Value = DateAdjust
SpinButton1.Value = 0
End Sub
Private Sub TextBox1_Change()
End Sub
Sub AutoFilter()
lastrow = Range("Sheet2!A6000").End(xlUp).Row
ActiveWorkbook.Names.Add Name:="Zones", RefersTo:="=Sheet2!$A$1:$A$" & lastrow
End Sub
Display More
Can some one help, is it a knopwn issue or a Cell format problem
Jasper