Results 1 to 8 of 8

Macro help - finding and displaying cell values

Threaded View

  1. #1
    Registered User
    Join Date
    10-10-2011
    Location
    Michigan
    MS-Off Ver
    2007
    Posts
    13

    Macro help - finding and displaying cell values

    I have a question regarding a Macro that I am trying to make.

    What I have set up is a UserForm that I have made with two listboxes as well as a command button. The listboxes show information from 2 categories, and when you pick one of both options and hit the command button, it displays a few characteristics that each category has, like length and width. The trouble I'm having is I need to be able to find and display the dimensions of each object, however, the way I have been trying to accomplish this hasn't been working. I the method I used to find the row of the selected item is as follows

    rowV1 = Application.WorksheetFunction.Match(ListBox1.Value, Range("List!A1:A50"), 0)
    rowT1 = Application.WorksheetFunction.Match(ListBox2.Value, Range("List!I1:I20"), 0)
    This method works, and it is stored in the above variables, and the columns for the width are the same for each category. The way I tried to find the value of the width was using this piece of code and it wasn't working.

        width1 = Cells(rowV1, 6).Value
        width2 = Cells(rowT1, 13).Value
        Cells(7, 2).Value = width1
        Cells(8, 2).Value = width2
    I need to do the same process for the length, but I am not sure how to go about this.

    Any help is appreciated. Thank you!
    Last edited by JayEmTee91; 10-11-2011 at 08:04 AM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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