avoiding debug error

  • Thread starter Thread starter R D S
  • Start date Start date
R

R D S

Hi,

I have a speadsheet with a userform into which items being ordered are
entered.
Clicking OK launches another form with pricing info displayed thanks to
VLOOKUP.
All works a treat until we enter something in error which isnt in the
VLOOKUP data range, at which point the debug error box pops up.

What is the best way to overcome this? Any ideas appreciated.

Many thanks,
Rick
 
Alan Beban said:
What do you want to happen instead?

Alan Beban

Anything more desirable. And easy for a novice to deal with.
Preferably a backtrack to amend the info or at least a return to a clear
form 1.

Rick
 
Substitute you 'Lookup' statement :

If IsError(Application.VLookup(rngS, rngList, 14, False)) Then
MsgBox "There is no item with this name."
' Then, clear whatever on the original form. Maybe clear the text
' box and select the text box?
Else
'Launch your form.
End If

HTH
Paul
 
R said:
Hi,

I have a speadsheet with a userform into which items being ordered are
entered.
Clicking OK launches another form with pricing info displayed thanks to
VLOOKUP.
All works a treat until we enter something in error which isnt in the
VLOOKUP data range, at which point the debug error box pops up.

What is the best way to overcome this? Any ideas appreciated.

Many thanks,
Rick
What do you want to happen instead?

Alan Beban
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top