Move Sheet

MikeDBMan

Well-known Member
Joined
Nov 10, 2010
Messages
608
When I record a macro to move a data sheet within a workbook, I get something like this:

Sheets("Parameters").Move After:=Sheets(5)

There may or may not be hidden sheets in this file. How do I get the proper "Sheets(5)". I can't figure out what that is. I have no sheet by that name. It is not the "codename" property. What is it and how do I get it?
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
That's the 5th sheet as you view the tabs reading left to right. Where do you want it?
 
Upvote 0

Forum statistics

Threads
1,215,967
Messages
6,127,980
Members
449,414
Latest member
sameri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top