ActiveSheet.Move After:=Sheets(Sheets.Count)
HTH
--
AP
> How do I write a macro to move the activesheet to the end of the active
> workbook.
>
> Thanks
>
> Greg
ReD-DevIL - 23 Mar 2006 09:28 GMT
Sub macro1()
Dim sheetnames() As String
Dim sheetcount As Integer
Dim i As Integer
sheetcount = ActiveWorkbook.Sheets.Count
ReDim sheetnames(1 To sheetcount)
For i = 1 To sheetcount
sheetnames(i) = ActiveWorkbook.Sheets(i).Name
Next i
ActiveWorkbook.ActiveSheet.Select
ActiveWorkbook.ActiveSheet.Move After:=Sheets(sheetcount)
End Sub

Signature
ReD-DevIL