+ Reply to Thread
Results 1 to 1 of 1

Pulling data into a textbox from spreadsheet

  1. #1
    Registered User
    Join Date
    05-01-2004
    Posts
    8

    Pulling data into a textbox from spreadsheet

    I have a multipage userform that has several drop down boxes that the user needs to populate (name, month etc..) from that I have text boxes that I want to populate from another spreadsheet located in the same file.
    I need to use an If-then because I want it too look until it finds a match to the month and then bring in column 3.
    I have the textbox set to refresh on _chg action of the dropdown and it is bringing in the first row but will not find the match. The code is included.

    Sub Populate04selldays()
    Dim Row As Integer, i As Long, j As Long

    Set selling = ThisWorkbook.Sheets("Selling")
    TopicCount = Application.WorksheetFunction.CountA(selling.Range("A:A"))
    For Row = 1 To TopicCount
    If selling.Cells(Row, 1) = cbmonth.Value Then
    tb04selldays.Value = selling.Cells(Row, 3).Value

    End If
    Next Row
    CurrentTopic = 1
    End Sub

    Any thoughts on how to make this match the month then bring in the data in another column?
    Last edited by eklarsen; 03-03-2005 at 01:13 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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