I think this is my current problem. I have no idea why I'm using variables, it was a piece of code I had some help with that I've used and that has worked... Up until now.
Should I in theory be able to rewrite all of that code instead as:
Private Sub cmbUpdate_Click()
Dim answer As Integer
answer = MsgBox("Please use 'Save' if entering a new Contract, this feature is for correcting mistakes in data entry.", vbYesNo + vbQuestion, "Are you sure you want to Update?")
If answer = vbYes Then
Cells(currentrow, 17).Value = txtCost.Value
Cells(currentrow, 18).Value = txtDeposit.Value
Cells(currentrow, 21).Value = txtStartdat1.Text
Cells(currentrow, 22).Value = txtPayment1.Text
Cells(currentrow, 24).Value = cbxPayment1.Text
Cells(currentrow, 25).Value = txtAmount1.Value
Cells(currentrow, 26).Value = txtStartdat2.Text
Cells(currentrow, 27).Value = txtPayment2.Text
Else
'do nothing
End If
And if I did change it to that, how would I then insert that code to format the dates?
Bookmarks