Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How can I move a sheet to the end of the workbook in VB?

I know how to move the sheets around:

Sheets("1996").Select
Sheets("1996").Move After:=Sheets(2)

But how can I move the sheet to the end of the book if the number of sheets
in the book changes often?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How can I move a sheet to the end of the workbook in VB?

Jon,

Try the following:

With ThisWorkbook.Worksheets
.Item("1996").Move after:=.Item(.Count)
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Jon Davie" <Jon wrote in
message
...
I know how to move the sheets around:

Sheets("1996").Select
Sheets("1996").Move After:=Sheets(2)

But how can I move the sheet to the end of the book if the
number of sheets
in the book changes often?



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
how do I move from one sheet to another in a workbook w/out mouse fb Excel Discussion (Misc queries) 1 January 13th 09 04:44 PM
move a sheet to another workbook phil-rge-ee Excel Discussion (Misc queries) 1 March 2nd 08 01:34 AM
Move the sheet tab bar to the top of the workbook? Dena Excel Discussion (Misc queries) 1 February 14th 06 08:49 PM
I would like to move from sheet to sheet in a workbook using keybo k-cess New Users to Excel 1 April 12th 05 03:23 AM


All times are GMT +1. The time now is 04:12 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"