View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] shawn.hobbs@gmail.com is offline
external usenet poster
 
Posts: 1
Default Receiving 'Error 1004' with VBA program

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.txtEn terDescription,
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.txtEn terDescription,
Sheet6.Range("L2").Offset(0, -9).Value))

End If


Please tell me what is wrong and how I can correct this?

Thank you,
Shawn