View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Worksheet relocation within workbook

Hi DC,

Instead of using the sheet's name, try using its index:

Befo=Sheets(1)

---
Regards,
Norman



"dcwhiz" wrote in message
ups.com...
I want to move a worksheet called "Test" to the beginning of several
workbooks.

I found

ActiveSheet.Move _
After:=ActiveWorkbook.Sheets(ActiveWorkbook.Sheets .Count)

on Microsoft's site and tried to change it to say ... Move _ Befo...
but this didn't work.

I can't say something like Move _ Befo=Sheets("Sheet1"), because the
workbooks don't have the same worksheet names. I need to use some sort
of relative reference.

Does anyone have any suggestions as to how I can write a macro that
will consistently move a specific sheet to the beginning of a workbook?

Thanks.