• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

List Box search option as numeric value greater than Zero

Sachin Bhor

New Member
Hi Friends,
I need your help , please refer the attached file for the same
Login Id - admin
Password- admin@123


Now I am Explaining you my requirement

1) Its related to Sheet named "ISSUE RM" in File
2) I have created user form in this sheet to issue material (please click on "ISSUE ENTRY" Button)
3) When you search for any MATERIAL NAME in form it is showing you report in LISTBOX
4) In list Box Data fetched from Sheet "INWARD_RM"
5) In list box last column having named "AVAILABLE" showing material available stock quantity

In this column, I want values to be searched which are greater than 0 only

can you help me the write VBA Logic for this.
 

Attachments

  • VBA TEST.xlsm
    101.9 KB · Views: 10
In the Sub, Private Sub CmdSearch_Click()
Change the line
If InStr(1, Cells(Rownum, 4).Value, Tsearch.Value, vbTextCompare) > 0 Then
to:
If InStr(1, Cells(Rownum, 4).Value, Tsearch.Value, vbTextCompare) > 0 And Cells(Rownum, 11).Value > 0 Then
 
In the Sub, Private Sub CmdSearch_Click()
Change the line
If InStr(1, Cells(Rownum, 4).Value, Tsearch.Value, vbTextCompare) > 0 Then
to:
If InStr(1, Cells(Rownum, 4).Value, Tsearch.Value, vbTextCompare) > 0 And Cells(Rownum, 11).Value > 0 Then

Thanks a Lot Sir ...
You Finished my task by completing last Mile..!!! :)
 
  • Like
Reactions: Hui
Back
Top