LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default How to catch Run-time error '91'

Hi All,

I am working in excel VBA. I have a userform with a combo box. I have a
list of names in a worksheet.

I need a textbox to populate the employee code with respect to the name
in the combo box.

To achieve this I have used 'find' function to find the name on
combobox_change event which finds the name and shows up the
corresponding employee code.

This works fine till the user selects from the dropdown. However, if i
am trying to type in a name which does not exist on the sheet, it gives
me Run-time error " 91 - Object Variable or with block variable not
set" which is correct.

I want to capture this event and inform the user that this name does
not exist in the spreadsheet.

Can someone please help me to do this. Thanks in advance.

Yash

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to catch the second or more cell with vlookup Valley Excel Worksheet Functions 8 April 24th 06 12:02 AM
Catch Error in macro sa02000[_23_] Excel Programming 4 April 18th 06 04:38 PM
How to catch the colorindex in a series leglouton Excel Programming 13 July 22nd 05 08:52 AM
how to catch errors from outlook helpwithXL Excel Programming 1 April 14th 05 05:26 PM
Catch-22 with Error 59 Dan[_28_] Excel Programming 0 November 13th 03 05:11 AM


All times are GMT +1. The time now is 11:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"