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
    z-eighty2
    Attached Files Attached Files

  2. #2

Posting Permissions

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