Moving a Worksheet

mhenk

Well-known Member
Joined
Jun 13, 2005
Messages
589
How can I use VBA to move a worksheet to the beginning of a workbook?
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Did you try recording a macro?

Code:
Sub Test()
    With ThisWorkbook
        .Worksheets("Sheet2").Move Before:=.Worksheets(1)
    End With
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,114,407
Messages
5,547,766
Members
410,811
Latest member
adustin42
Top