Results 1 to 3 of 3

Sorting from row A6 onwards

Threaded View

teebird Sorting from row A6 onwards 05-18-2007, 12:50 AM
Trebor76 Hi there, Using the... 05-18-2007, 01:58 AM
mudraker teebird In you post you... 05-18-2007, 02:46 AM
  1. #1
    Registered User
    Join Date
    01-18-2007
    Posts
    22

    Sorting from row A6 onwards

    I want to set up a button on my spreadsheet so that when the user wants to sort the column of names it will do it.

    Problem is that my names start in row A8 - When I try to sort using the Ascending and descending arrows - the sort includes my headers etc in the first 7 rows.

    I don't want use the the Auto filter.

    Here is some code that I found but I can not get it to work.

    Private Sub cmdSort_Click()
    
    Dim iRow As Long
    Dim ws As Worksheet
    
    With Workbook.ws("WeightData")
       iRow = .Cells(Rows.Count, 1).End(xlUp).Offset(1).Row
    
            .Range("A6:A" & iRow).Sort , xlAscending, xlNo
    
        End With
    
    End Sub
    Last edited by VBA Noob; 05-18-2007 at 02:28 AM.

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