Hi All,
1st time posting and its been over 10yrs since I've used my VBA skills so please accept my appolgise if I have rehashed anything in the forums but so far I've not found a solution.
I've created a userform which is entering data into spreadsheet.
I'm have some issues with defining the properties of text boxes being auto converted to a value when pasting in the spread sheet.
Day Requested - I've tried using date picker but I have not worked out how to get it to convert so I've gone to a text box for now, this needs to convert a date to day of the week (ie. 2/6/2018 = Saturday)
Time Required - I've used drop downs and others but I need 3 options here where the end user can enter either "AM" "PM" or a custom time frame option
Contact Number - I need to have this convert to a number format without dropping the 0 at the start. Only way I've worked this out is to be custom text
I'm also having some issues with defining and sorting enteries but if I can get these 3 fields fixed then I'm sure the rest should be easier.
That formula pasts the values into the spreadsheet then closes the form, have a similar one that enters then clears the form ready for use again.
Thanks all for any assistance
1st time posting and its been over 10yrs since I've used my VBA skills so please accept my appolgise if I have rehashed anything in the forums but so far I've not found a solution.
I've created a userform which is entering data into spreadsheet.
I'm have some issues with defining the properties of text boxes being auto converted to a value when pasting in the spread sheet.
Day Requested - I've tried using date picker but I have not worked out how to get it to convert so I've gone to a text box for now, this needs to convert a date to day of the week (ie. 2/6/2018 = Saturday)
Time Required - I've used drop downs and others but I need 3 options here where the end user can enter either "AM" "PM" or a custom time frame option
Contact Number - I need to have this convert to a number format without dropping the 0 at the start. Only way I've worked this out is to be custom text
I'm also having some issues with defining and sorting enteries but if I can get these 3 fields fixed then I'm sure the rest should be easier.
Code:
Dim wb As Workbook
Dim ws As Worksheet
Dim LValue As Date
Dim FirstCell As String
Dim LastRow As Long
Dim i As Integer
FirstCell = "A6"
Range(FirstCell).Select
Set wb = ThisWorkbook
Set ws = wb.Sheets("Daily Job List")
LValue = Now
Do Until ActiveCell.Value = ""
If ActiveCell.Value = "" Then
Exit Do
Else
ActiveCell.Offset(1, 0).Select
End If
Loop
LastRow = ws.Range("A" & Rows.Count).End(xlUp).Row + 1
ws.Range("A" & LastRow).Value = Daytxt.Text
ws.Range("B" & LastRow).Value = Timetxt.Text
ws.Range("C" & LastRow).Value = Jobnotxt.Text
ws.Range("D" & LastRow).Value = Ordnotxt.Text
ws.Range("E" & LastRow).Value = CompNametxt.Text
ws.Range("F" & LastRow).Value = ContactTxt.Text
ws.Range("G" & LastRow).Value = ContNotxt.Text
ws.Range("H" & LastRow).Value = Delivertxt.Text
ws.Range("I" & LastRow).Value = TypeCombo.Text
ws.Range("J" & LastRow).Value = Amounttxt.Text
ws.Range("N" & LastRow).Value = LValue
That formula pasts the values into the spreadsheet then closes the form, have a similar one that enters then clears the form ready for use again.
Thanks all for any assistance