Hi NoSparks
yes I did have to install the module to get the date picker . To be really clear does this mean that module would have to be installed on every PC that runs this form?
If this is the case can you assist in the code for the calendar ?
In the meantime I did follow your suggestion and looked at the SAVE command and made changes ( thanks for pointing me to the obvious !) ....and it worked ,but if this a local PC only issue then i have to find another route
I have included the code hope you can find some time to help , it would be really appreciated
Private Sub CommandButton2_Click()
Application.Workbooks.Open ("Q:\ADH_SUPPORT_SVCS\xxxxxxxxxx\Master Interpreter Bookings.xlsm")
Dim wb As Workbook, sh As Worksheet
Set wb = Workbooks("Master Interpreter Bookings.xlsm")
Set sh = wb.Sheets(1)
cAry = Array(Me.ComboBox1, Me.TextBox3, Me.TextBox6, Me.TextBox7, Me.ComboBox2, Me.TextBox5, Me.TextBox9, Me.TextBox16, Me.TextBox11, Me.TextBox15, Me.TextBox14)
With sh
For i = 1 To 13
.Cells(Rows.Count, i).End(xlUp)(2) = cAry(i - 1).Value
Next
End With
Application.DisplayAlerts = False
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
'Enter number for UR , format set as number
Private Sub TextBox5_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If (KeyAscii > 47 And KeyAscii < 58) Or KeyAscii = 46 Or KeyAscii = 32 Then
KeyAscii = KeyAscii
Else
KeyAscii = 0
MsgBox "Invalid key pressed,enter Number"
End If
End Sub
Private Sub UserForm_Initialize()
ComboBox1.AddItem "REQUEST"
ComboBox1.AddItem "CANCEL"
ComboBox2.AddItem "MALE"
ComboBox2.AddItem "FEMALE"
'ComboBox3.AddItem "GPU"
'ComboBox3.AddItem "SRU"
'ComboBox3.AddItem "SNU"
'ComboBox3.AddItem "OMS"
'ComboBox3.AddItem "ORTHO"
ComboBox4.AddItem "MML"
ComboBox4.AddItem "IB"
ComboBox4.AddItem "KS"
ComboBox4.AddItem "Other"
ComboBox5.AddItem "Miss"
ComboBox5.AddItem "Mr"
ComboBox5.AddItem "Mrs"
ComboBox5.AddItem "Ms"
Me.TextBox3.Text = Format(Now(), "DD/MM/YYYY")
End Sub
Private Sub CommandButton1_Click()
Dim irow As Long
Dim wb As Workbook
Dim ws As Worksheet
Set ws = Worksheets("Interpreter Requests")
'find first row in database
irow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
With ws
.Range("A" & irow).Value = Me.ComboBox1.Text
.Range("B" & irow).Value = Me.TextBox3.Text
.Range("C" & irow).Value = Me.TextBox6.Text
.Range("D" & irow).Value = Me.TextBox7.Text
.Range("E" & irow).Value = Me.ComboBox2.Text
.Range("F" & irow).Value = Me.TextBox5.Text
'.Range("G" & irow).Value = Me.TextBox8.Text
.Range("G" & irow).Value = Me.DTPicker1.Value
.Range("H" & irow).Value = Me.TextBox9.Text
.Range("I" & irow).Value = Me.TextBox16.Text
.Range("J" & irow).Value = Me.TextBox11.Text
.Range("K" & irow).Value = Me.TextBox15.Text
.Range("L" & irow).Value = Me.TextBox14.Text
.Range("M" & irow).Value = Me.ComboBox4.Text
.Range("N" & irow).Value = Me.TextBox13.Text
End With
'TextBox1.Value = ""
'TextBox2.Value = ""
'TextBox3.Value = ""
ComboBox1.Value = ""
'TextBox3.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox2.Value = ""
TextBox5.Value = ""
'TextBox8.Value = ""
TextBox9.Value = ""
'TextBox16.Value = ""
TextBox11.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
TextBox14.Value = ""
'TextBox12.Value = ""
TextBox13.Value = ""
End Sub