I am getting a "run-time error '13' type mismatch"
Debug: -
I cannot think of what I have done wrong.
COde: -
Debug: -
VBA Code:
Sub Show_Form()
frmform.Show
End Sub
I cannot think of what I have done wrong.
COde: -
VBA Code:
Option Explicit
Sub Reset()
Dim iRow As Long
iRow = [Count(Database!A;A)] ' identify the last row
With frmform
.txtName.Value = ""
.txtDate.Value = ""
.txtTime.Value = ""
.txtCustomer.Value = ""
.txtSystem.Value = ""
.txtCallout.Value = ""
.cmbSeverity.Clear
.cmbSeverity.AddItem "N/A"
.cmbSeverity.AddItem "1"
.cmbSeverity.AddItem "2"
.cmbSeverity.AddItem "3"
.cmbSeverity.AddItem "4"
.txtProbNum.Value = ""
.txtTimeSpent.Value = ""
.txtDescription.Value = ""
.txtAction.Value = ""
.txtComments.Value = ""
.lstCalloutDB.ColumnCount = 12
.lstCalloutDB.ColumnHeads = True
.lstCalloutDB.ColumnWidths = "60,60,60,60,60,60,60,60,60,60,60,60,"
If iRow > 1 Then
.lstCalloutDB.RowSource = "Call Out Log!A2:L" & iRow
Else
.lstCalloutDB.RowSource = "Call Out Log!A2:L2"
End If
End With
End Sub
Sub Submit()
Dim sh As Worksheet
Dim iRow As Long
Set sh = ThisWorkbook.Sheets("Call Out Log")
iRow = [Counta(Call Out Log!A:A] + 1
With sh
.Cells(iRow, 1) = iRow - 1
.Cells(iRow, 2) = frmform.txtName.Value
.Cells(iRow, 3) = frmform.txtDate.Value
.Cells(iRow, 4) = frmform.txtTime.Value
.Cells(iRow, 5) = frmform.txtCustomer.Value
.Cells(iRow, 6) = frmform.txtSystem.Value
.Cells(iRow, 7) = frmform.txtCallout.Value
.Cells(iRow, 8) = frmform.cmbSeverity.Value
.Cells(iRow, 8) = frmform.txtProbNum.Value
.Cells(iRow, 10) = frmform.txtTimeSpent.Value
.Cells(iRow, 11) = frmform.txtDescription.Value
.Cells(iRow, 12) = frmform.txtAction.Value
.Cells(iRow, 12) = frmform.txtComments.Value
End With
End Sub
Sub Show_Form()
frmform.Show
End Sub