Results 1 to 2 of 2

Columns not showing correctly

Threaded View

  1. #1
    Registered User
    Join Date
    05-20-2008
    Posts
    20

    Columns not showing correctly

    I'm able to display the data I take out from db worksheet as rows correctly. But I'm unable to display it as columns correctly...what is wrong?

    Private Sub CommandButton1_Click()
    
    Dim intRow As Integer
    Dim custIDchosen As String
    
    intRow = 2
    
    Do While Worksheets("db").Cells(intRow, 2).Value <> ""
        If CStr(Worksheets("db").Cells(intRow, 1).Value) = Sheets("nvT").Range("b1").Value Then
            
            cusID = Worksheets("db").Cells(intRow, 5).Value
            cus = Worksheets("db").Cells(intRow, 4).Value
            Sheets("nvT").Range("a" & Rows.Count).End(xlUp)(2).Resize(, 2).Value = _
            Array(cusID, cus)
            
            proID = Worksheets("db").Cells(intRow, 7).Value
            pro = Worksheets("db").Cells(intRow, 8).Value
            Worksheets("Sheet1").Range("b1", Worksheets("Sheet1").Cells(1, Columns.Count).End(xlToLeft))(3).Value = _
            Array(proID)
        End If
        
        intRow = intRow + 1
     Loop
     
    
     
    End Sub
    Last edited by Pukka83; 05-21-2008 at 04:23 AM. Reason: Title Edit

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