![]() |
Moving sheets
How do I write a macro to move the activesheet to the end of the active
workbook. Thanks Greg |
Moving sheets
ActiveSheet.Move After:=Sheets(Sheets.Count)
HTH -- AP "Greg" a écrit dans le message de ... How do I write a macro to move the activesheet to the end of the active workbook. Thanks Greg |
Moving sheets
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 -- ReD-DevIL ------------------------------------------------------------------------ ReD-DevIL's Profile: http://www.excelforum.com/member.php...o&userid=32624 View this thread: http://www.excelforum.com/showthread...hreadid=525594 |
All times are GMT +1. The time now is 02:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com