The code below shows no errors but does not post any data when I click the button
I'm sure that one of you experts out there will immediately see the error I have obviously made
Cheers all and HAPPY NEW YEAR
Derek
Code:
Private Sub cmbAddEntry_Click()
Dim LastRow As Long, ws As Worksheet
Set ws = ActiveSheet
LastRow = ws.Range("a" & Rows.Count).End(xlUp).Row + 1
ws.Range("B" & LastRow) = txtDate.Text
ws.Range("G" & LastRow) = cmbVAT.value
ws.Range("H" & LastRow) = txtValue.value
ws.Range("C" & LastRow) = cmbSuppliers.value
If cmbColumn.value = "Stock" Then
ws.Range("I" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Motor Expenses" Then
ws.Range("J" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Rent" Then
ws.Range("K" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Utilities" Then
ws.Range("L" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Telecoms" Then
ws.Range("M" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Printing & Stationery" Then
ws.Range("N" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Adverts & Promotions" Then
ws.Range("O" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Insurance" Then
ws.Range("P" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Sundry Expenses" Then
ws.Range("Q" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Private Drawings" Then
ws.Range("R" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Packaging Postage PO Parcel Force" Then
ws.Range("S" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Banking Fees" Then
ws.Range("T" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Loans" Then
ws.Range("U" & LastRow) = txtNett.value
Else
If cmbColumn.value = "Wages" Then
ws.Range("V" & LastRow) = txtNett.value
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
I'm sure that one of you experts out there will immediately see the error I have obviously made
Cheers all and HAPPY NEW YEAR
Derek