ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sheets("Sheet1").Move After:=Sheets(2) (https://www.excelbanter.com/excel-programming/350929-sheets-sheet1-move-after-%3Dsheets-2-a.html)

Arturo

Sheets("Sheet1").Move After:=Sheets(2)
 
Is there syntax that will allow me to move a sheet of choice to the end
without requiring the number of sheets being known?

Arturo

Leith Ross[_474_]

Sheets("Sheet1").Move After:=Sheets(2)
 

Hello Arturo,

Change "Sheet1" to the sheet you wish to move to the end.

Worksheets("Sheet1").Move After:=Worksheets(Worksheets.Count)

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=503032


Arturo

Sheets("Sheet1").Move After:=Sheets(2)
 
Just found this link:

http://computerwhizzard.50megs.com/excelmacros.html

Sub AddSheetsTutorialExampleRevised()
With ActiveSheet
.Move after:=Worksheets(Worksheets.Count)
End With
End Sub




"Arturo" wrote:

Is there syntax that will allow me to move a sheet of choice to the end
without requiring the number of sheets being known?

Arturo



All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com