sheet tab order

C

Carl R

I created a work book with Multiple sheet tabs. When I numerically
personalize each tab I will not start in order of, example 1,2,3,4..... but
start with 15,7,3,12.... can I get these tabs to Automatically go in order
as I numerically personalize each sheet tab???
 
D

Dave Peterson

I don't think you can make this automatic. (I don't even see a pattern so that
you could automate it.)

But you can drag and drop the sheet tabs in the order that you like.

(Or you can rightclick on the tab and choose Move or Copy and put it in the
order you want.)
 
C

Chip Pearson

I don't quite understand what you are trying to do, but you could store the
names in order in an array and use code to name the sheets accordingly.

Sub AAA()
Dim SheetNames As Variant
Dim N As Long
Dim ArrOffset As Long
SheetNames = Array("Sheet12", "Sheet5", "Sheet7") '<<<< CHANGE SHEET
NAMES
ArrOffset = IIf(LBound(SheetNames) = 0, 1, 0)
For N = LBound(SheetNames) To UBound(SheetNames)
Worksheets(N + ArrOffset).Name = SheetNames(N)
Next N
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
 
Top