Hi
I have a userform which once completed transfers the info into the next empty row of a worksheet.
Problem is that four of the seleciotns are listboxes and for whatever reason the info selected by the user in the listbox will not transfer.
The code I am using is as follows
'find next empty row
nextrow = Application.WorksheetFunction.CountA(Range("a:a")) + 1
'Transfers the info
Dim DateBox As String
Dim Starttime As String
Dim Endtime As String
DateBox = Daybox.Text & "/" & Monthbox.Text & "/" & Yearbox.Text
Starttime = Starthrs.Text & ":" & Startmins.Text
Endtime = endhrs.Text & ":" & endmins.Text
Cells(nextrow, 1) = DateBox
Cells(nextrow, 2) = Casebox.Text
Cells(nextrow, 3) = Typebox.Text
Cells(nextrow, 4) = letterbox.Text
Cells(nextrow, 5) = Summarybox.Text
Cells(nextrow, 6) = Starttime
Cells(nextrow, 7) = Endtime
Cells(nextrow, 10) = Extratime.Text
Where Starttime and Endtime are the listboxes.
Can anyone tell me why this is happening and maybe a solution?
Thanks
Jo
I have a userform which once completed transfers the info into the next empty row of a worksheet.
Problem is that four of the seleciotns are listboxes and for whatever reason the info selected by the user in the listbox will not transfer.
The code I am using is as follows
'find next empty row
nextrow = Application.WorksheetFunction.CountA(Range("a:a")) + 1
'Transfers the info
Dim DateBox As String
Dim Starttime As String
Dim Endtime As String
DateBox = Daybox.Text & "/" & Monthbox.Text & "/" & Yearbox.Text
Starttime = Starthrs.Text & ":" & Startmins.Text
Endtime = endhrs.Text & ":" & endmins.Text
Cells(nextrow, 1) = DateBox
Cells(nextrow, 2) = Casebox.Text
Cells(nextrow, 3) = Typebox.Text
Cells(nextrow, 4) = letterbox.Text
Cells(nextrow, 5) = Summarybox.Text
Cells(nextrow, 6) = Starttime
Cells(nextrow, 7) = Endtime
Cells(nextrow, 10) = Extratime.Text
Where Starttime and Endtime are the listboxes.
Can anyone tell me why this is happening and maybe a solution?
Thanks
Jo