Moving sheets in code

A

Ayo

I want to perform the action in the code line below:

Worksheets("Clusters Summary Report").Move before:=Worksheets("Cluster 1")

This works fine, but the problem is "Cluster 1" is not always going to be
the first worksheet inj the workbook. I am looking for a say to tell the code
to move sheet "Clusters Summary Report" into the first position in the
workbook so that the first worksheet in the workbook is "Clusters Summary
Report".
Is there a way to do this?
 
G

Gord Dibben

Worksheets("Clusters Summary Report").Move before:=Sheets(1)


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top