+ Reply to Thread
Results 1 to 2 of 2

code for reordering sheets

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    code for reordering sheets

    Hello. Could someone explain what each line of this code is doing (as well as what the syntax means)? Also, I use the debugger and I was curious as to why I can't see the value of "Name" in the 9th line.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: code for reordering sheets

    I don't think anyone wants to go through line by line with comments, and it seems like you are well on your way to understanding it by using the debugger (which would have been my initial response). Watch what it does and you should be able to determine what is going on. The code is using a simple 'bubble sort' technique, and if you Google that term you will find many demonstrations on that method. That is probably what you need help in understanding.
    As for "Name", it is not a variable on its own. It is an instance variable within the Sheets class. So, debugging for "Name" is not enough information, you need to help by telling it which Name you are looking for (e.g. Application.Sheets(3).Name).
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code reordering list by criteria
    By amador in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2014, 12:08 AM
  2. Replies: 4
    Last Post: 01-06-2014, 02:14 AM
  3. [SOLVED] Reordering Charts
    By PlamenGo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-02-2012, 11:54 AM
  4. reordering issue
    By fa5fou5 in forum Excel General
    Replies: 4
    Last Post: 02-09-2012, 12:06 PM
  5. Reordering a list
    By Buffy500 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2009, 05:38 AM

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