Kristen_cancerkiller
Member
I have the following code and when I save it in vba editor I receive a 'Variable not defined' error on 'Cell' in the row directly under 'If Worksheets'. I have tried to search the error online and on Chanoo and am not having any luck. I know it is a small fix but I just don't know what the fix is. Please help?
>>> use code -tags <<<
Code:
Public Sub DivAdminApproval()
'Call DivAdminApproval
With Worksheets("Travel Expense Voucher")
If Worksheets("Travel Expense Voucher").Cells("F5") = 2 Then
For Each Cell In .Range("O15:O45")
If Cells.Value = 0.58 Then
MsgBox "You have selected reimbursement at the 'HIGH' mileage rate ($.58/mile). To receive reimbursement at this rate, Division Administrator Approval is Required.", vbCritical, "Important:"
Exit Sub
End If
Next myCell
End Sub
Last edited by a moderator: