Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Moving sheets

How do I write a macro to move the activesheet to the end of the active
workbook.


Thanks

Greg


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default 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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving Data between sheets in the same workbook and moving data between Workbooks. Alison Brown Excel Worksheet Functions 0 February 10th 09 01:03 AM
Moving Between Sheets PaolaAndrea Excel Discussion (Misc queries) 1 December 2nd 08 05:15 PM
Moving sheets affordsol Excel Programming 3 March 17th 06 07:29 AM
Moving sheets Greg[_19_] Excel Programming 4 February 24th 05 12:26 PM
Moving through sheets Keith Emery Excel Programming 2 June 22nd 04 01:53 PM


All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"