Results 1 to 6 of 6

Using RANGE to find a spreadsheet record based on a value in a column

Threaded View

  1. #1
    Registered User
    Join Date
    01-06-2020
    Location
    Vancouver, Canada
    MS-Off Ver
    10
    Posts
    39

    Using RANGE to find a spreadsheet record based on a value in a column

    I've spent hours, cannot solve this so hopefully someone can help. I've tried to simplify the problem from the original xlsm file.

    There is a single spreadsheet containing a list of clinician names. Column A is a RECORD NUMBER (unique integer) for a clinician, Column B is the DISCIPLINE of the clinician (WCC, CNE, etc.), Column C is the clinician's NAME, Column D is the DATE ADDED of the record and Column E is the STATUS (ACTIVE, INACTIVE) of the record.

    The form to start this simple application is frmStart. Select one of the five disciplines and click "GO". This opens frmClinician and loads the listbox in the form with all the clinicians from the spreadsheet for the selected discipline.

    The form allows you to enter new names into the spreadsheet or modify the status of clinicians already entered in the spreadsheet.

    The process for entering new names works. No problem there.

    The problem is when selecting an existing name in the listbox so I can modify the status of the selected clinician. The problematic code is in the lstClinicians_Click() subroutine. I can get the index number of the selected clinician from the listbox. I can get the record number of the selected clinician from the spreadsheet. I'm trying to use the record number in the RANGE method to get the row number of the selected clinician from the spreadsheet so I can update the status of that clinician in that row.

    I have the line of code with the RANGE method commented out right now, but when you remove the comment and then try to select a clinician from the listbox, i get the error.

    I have spent hours trying to get this to work. My give up. can you help, please?
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Select the record in a spreadsheet that matches the selected record in a listbox control
    By vancouver_ron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-06-2022, 11:50 AM
  2. [SOLVED] I have a record in cell A, I want to find it in a range of records...
    By tai8 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-13-2017, 11:54 AM
  3. Create button on spreadsheet when clicked record date stamp in the next column
    By HBHB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2013, 06:52 PM
  4. Replies: 20
    Last Post: 11-15-2012, 09:32 PM
  5. Replies: 2
    Last Post: 08-17-2005, 04:05 PM
  6. Replies: 1
    Last Post: 05-27-2005, 06:05 PM
  7. Replies: 0
    Last Post: 05-27-2005, 05:05 PM

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