Hello,
I'm a total newbie when it comes to VBA. I've created an ActiveX Control button with the following code:
For some reason, the button only works for the first line ".Cells(findRow, 4) = Current_Medications" but not the second line ".Cells(findRow, 6) = diagnosis_problem_list".
Can somebody help point out my mistake?
I'm a total newbie when it comes to VBA. I've created an ActiveX Control button with the following code:
Code:
Private Sub Save_Changes_Click()
Dim findRow As Long
findRow = Application.WorksheetFunction.Match(Range("C3"), ThisWorkbook.Sheets("Patient table").Range("A:A"), 0)
With Worksheets("Patient table")
.Cells(findRow, 4) = Current_Medications
.Cells(findRow, 6) = diagnosis_problem_list
End With
End Sub
For some reason, the button only works for the first line ".Cells(findRow, 4) = Current_Medications" but not the second line ".Cells(findRow, 6) = diagnosis_problem_list".
Can somebody help point out my mistake?