Results 1 to 2 of 2

Thread: Error! when searching data from worksheet.

  1. #1

    Error! when searching data from worksheet.

    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello EveryOne,

    I have got a UserForm to search data from worksheet and show it in userform.

    In my search userform, the data is searched by first selecting " Year " and then " Batch Number " (Two Batches runs in a Year)
    so I filled combo boxes with "Batch 1" and "Batch 2"

    for example "Year 2013 " would have "Batch 1 and Batch 2"
    "Year 2014" would have "Batch 1 and Batch 2"

    In my worksheet, it has Data for "Year 2013" and data for "Year 2014" has not yet been inserted.

    The Problem is that when In the Userform I select " Year 2013 " and select Batch 1 or 2 it shows data in list box and in textboxes.

    But when I select "Year 2014" and select "Batch 1" or "Batch 2" it gives error.

    I know there is no data for "Year 2014" yet in the worksheet, but I want it should not give error in vba coding, But It should display MsgBox "No record found"

    I have attached worksheet and userform.

    I hope you guys will be understaning what I really mean?

    Plz help

    Kind Regards
    Attached Files Attached Files

  2. #2
    Acolyte patel's Avatar
    Join Date
    Feb 2014
    Excel Version

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts