S
shawn.hobbs
I am writing a VBA that allows the user to scan or enter an item on
lines in a spreadsheet. If the UPC is not valid, it triggers a
Userform that let's the user to input a description to find the item
in question instead of a UPC.
The problem I am having is in the programming linking the Userform
description to the find formula. If there is a match, the program
continues fine; however, if there is no match, the program issues an
'Error 1004' and stalls at the following line:
If IsError(Sheet6.Range("L2").Formula =
Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Find(frmMatchDescriptions.txtEnterDescription,
Sheet6.Range("L2").Offset(0, -9).Value))) Then
Sheet6.Range("L2").Value = False
Else
Sheet6.Range("L2").Formula =
Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Find(frmMatchDescriptions.txtEnterDescription,
Sheet6.Range("L2").Offset(0, -9).Value))
End If
Please tell me what is wrong and how I can correct this?
Thank you,
Shawn
lines in a spreadsheet. If the UPC is not valid, it triggers a
Userform that let's the user to input a description to find the item
in question instead of a UPC.
The problem I am having is in the programming linking the Userform
description to the find formula. If there is a match, the program
continues fine; however, if there is no match, the program issues an
'Error 1004' and stalls at the following line:
If IsError(Sheet6.Range("L2").Formula =
Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Find(frmMatchDescriptions.txtEnterDescription,
Sheet6.Range("L2").Offset(0, -9).Value))) Then
Sheet6.Range("L2").Value = False
Else
Sheet6.Range("L2").Formula =
Application.WorksheetFunction.IsNumber(Application.WorksheetFunction.Find(frmMatchDescriptions.txtEnterDescription,
Sheet6.Range("L2").Offset(0, -9).Value))
End If
Please tell me what is wrong and how I can correct this?
Thank you,
Shawn