Hi,
have the code below giving me run-time error 13 type mismatch and highlighting this line:
Complete code:
Thank you,
have the code below giving me run-time error 13 type mismatch and highlighting this line:
VBA Code:
rowselect = rowselect + 1
Complete code:
VBA Code:
Private Sub cmdupdate_Click()
If Me.cmbslno.Value = "" Then
MsgBox "SAGEID Can Not be Blank!!!", vbExclamation, "SAGEID"
Exit Sub
End If
SLNo = Me.cmbslno.Value
Sheets("DISTRIBUTION_SET_G-L_CODING").Select
Dim rowselect As String
Dim msg As String
Dim ans As String
rowselect = Me.cmbslno.Value
rowselect = rowselect + 1
Rows(rowselect).Select
Cells(rowselect, 2) = Me.txtvendor.Value
Cells(rowselect, 3) = Me.txtcurrency.Value
Cells(rowselect, 4) = Me.txtbPO.Value
Cells(rowselect, 5) = Me.txtapprover.Value
Cells(rowselect, 6) = Me.txtGLcode.Value
Cells(rowselect, 7) = Me.txtLineDes.Value
Cells(rowselect, 8) = Me.txttax.Value
Cells(rowselect, 9) = Me.txtAccTer.Value
Cells(rowselect, 10) = Me.txtOrgUnit.Value
rowselect = rowselect - 1
msg = "SAGEID " & rowselect & " Successfully Updated...Continue?"
Unload Me
ans = MsgBox(msg, vbYesNo, "Update")
If ans = vbYes Then
UserForm1.Show
Else
Sheets("DISTRIBUTION_SET_G-L_CODING").Select
End If
End Sub
Thank you,