I'm currently creating a simple form with an edit function that autofills the remainder details using the application.match function.
however based on my current code, i'm drawing error 13.
(vba newbie here btw)
anyway here's the code - would appreciate the feedback (if any ). Namaste! :
Private Sub CmbBox2_inv_edit_Change()
If Me.CmbBox2_inv_edit.Value <> "" Then
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Data Input Form")
Dim i As Integer
i = Application.Match(VBA.CLng(Me.CmbBox2_inv_edit.Value), sh.Range("A:A"), 0)
Me.TextBox2_DATE.Value = sh.Range("B" & i).Value
Me.txtbox3_name.Value = sh.Range("C" & i).Value
Me.CmbBox1.Value = sh.Range("D" & i).Value
Me.TextBox4_sales_amnt.Value = sh.Range("E" & i).Value
End If
End Sub
question from:
https://stackoverflow.com/questions/65661234/need-help-diagnosing-vba-mismatch-error-13 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…