Userform Help!!

K

K1KKKA

Hi,

Am using this code to place to dates into specific cells on another
worksheet, this in turn starts a macro that then filters the
information on the sheet named "Data",


here is the problem:

When i enter the following date into the form 11/02/07
i.e. 11 Feb 2007

Then view the data sheet it is shown as 02 Nov 2007 where do i adjust
the code to make the form box understand the format i am trying to use

ie dd/mm/yy rather than mm/dd/yy

Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Data")
'find first empty row in database
iRow = ws.Cells(Rows.Count, 18) _
.End(xlUp).Offset(0, 0).Row
'copy the data to the database
ws.Cells(iRow, 12).Value = Me.date1.Value
ws.Cells(iRow, 13).Value = Me.date2.Value
'clear the data
Me.date1.Value = ""
Me.date2.Value = ""
Me.date1.SetFocus
End Sub



Any help would be appreciated and rated

Steve
 
G

Gord Dibben

Either change your regional settings or enter the date as mm/dd/yy


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top