Results 1 to 4 of 4

Data sorted when sheet opens

Threaded View

cakonopka Data sorted when sheet opens 01-30-2010, 09:07 AM
mrice Re: Data sorted when sheet... 01-30-2010, 09:18 AM
Richard Buttrey Re: Data sorted when sheet... 01-30-2010, 09:21 AM
cakonopka Re: Data sorted when sheet... 01-30-2010, 09:40 AM
  1. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Data sorted when sheet opens

    Paste the following macro into the ThisWorkbook tab in the VBA editor (Alt F11) and adjust as necessary to specify the sheet, the range of data and the column to sort by.

    Private Sub Workbook_Open()
    Sheets("MySheetName").Cells(1, 1).CurrentRegion.Sort Header:=xlYes, key1:=Sheets("MySheetName").Cells(1, 1), order1:=xlAscending
    End Sub
    Last edited by mrice; 01-30-2010 at 09:25 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