Closed Thread
Results 1 to 3 of 3

On ComboBox change get data with reference of Job number

Hybrid View

skhari On ComboBox change get data ... 06-20-2015, 04:50 AM
Marc L Re: Number is not working in... 06-20-2015, 06:23 AM
Fotis1991 Re: On ComboBox change get... 06-22-2015, 02:36 AM
  1. #1
    Forum Contributor
    Join Date
    05-12-2012
    Location
    India, Chennai
    MS-Off Ver
    Excel 2003
    Posts
    182

    On ComboBox change get data with reference of Job number

    Dear Experts

    I am trying to get value from cell to Userform with the reference of Job Numbers
    Worksheet named "Master"
    Job Number : P2:P (JobNumCB)
    eg. P2=1, P3=Plumbing,P4=30,P4=35,.....
    Job Reference Code " Q2:Q (JobRefCodeLB)
    eg. Sometext/num/Part

    Only if i select "Plumbing" I am getting relevant answer
    I am having result only if i select text but not number

    I trying this code below. Please help !!!
    Attached" image reference

    Private Sub JobNumCB_Change()
    Dim JNCB As String
     
        Dim FJNCB As Range
         
        'sets the variable JNCB equal to the value in the JobNumCB
        JNCB = JobNumCB.Value
        'selected the Master worksheet
        Worksheets("Master").Activate
        'set the variable equal to the found cell in the Master worksheet
        'whose value is equal to the SellerNameCB value
        Set FJNCB = Sheets("Master").Cells.Find(what:=JNCB, LookIn:=xlFormulas, lookat:=xlWhole)
         
        'if the value is not found then do nothing
        If FJNCB Is Nothing Then
        JobRefCodeLB.Caption = "Job Ref. Code"
        Exit Sub
        Else
           
            Application.Goto FJNCB
            
            JobRefCodeLB.Caption = ActiveCell.Offset(0, 1).Value
            Worksheets("Controls").Activate
     
        
     
       Exit Sub
       End If
    End Sub
    Attached Images Attached Images
    Last edited by skhari; 06-20-2015 at 10:17 AM. Reason: added one more image reference

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Number is not working in VBA Lookin funtion


    Try with JobNumCB.Text …

    If not works, attach workbook.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: On ComboBox change get data with reference of Job number

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help with adding IF Funtion to working Hyperlink formula
    By Comesummer in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2014, 05:35 AM
  2. sum funtion not working in VBA
    By mjwakema in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-19-2013, 09:28 AM
  3. Lookin up stuff
    By dcolodny in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-01-2013, 11:12 PM
  4. copy paste funtion with Thisworkbook and ActiveSheet not working?
    By trillium in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2011, 04:02 PM
  5. Why Isnt My If funtion Working When comparing ROI
    By Dberends in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-11-2009, 10:50 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1