Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I am not too familiar with errors in my code and was hoping for some help with this please. I have a control box linked to a stock spreadsheet. After I update this box(Which is for the stock number), the label next to it will update with the stock item description. My code does a vlookup for this value: Public Sub BinNumber1_AfterUpdate() Description1 = (WorksheetFunction.VLookup(BinNumber1.Value, Worksheets("Current Stock").Range("A:B"), 2, False)) End Sub This works fine if a valid stock number is entered but if someone enters a bogus number I would like my msgbox to appear saying "Bad stock number blah blah.." instead of VB opening for debugging. Thanks in advance for any help. John -- johncassell ------------------------------------------------------------------------ johncassell's Profile: http://www.excelforum.com/member.php...o&userid=25016 View this thread: http://www.excelforum.com/showthread...hreadid=391660 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VALUE Errors | Excel Discussion (Misc queries) | |||
Excel Throwing Circular Errors When No Errors Exist | Excel Worksheet Functions | |||
#Value! errors | New Users to Excel | |||
IIf and value-errors | Excel Discussion (Misc queries) | |||
Unresolved Errors in IF Statements - Errors do not show in results | Excel Worksheet Functions |