Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet relocation within workbook
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet relocation within workbook
Easier done than said. So the index of sheets is just a simple
reference to the sheet order? It seems all too easy compared to what I was trying to do. Thank you very much for your help Norman. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy worksheet from one workbook to a master workbook | Excel Worksheet Functions | |||
Relocation Moving Movers Los Angeles CA | Excel Discussion (Misc queries) | |||
Copy Data from Workbook into specific Worksheet in other Workbook? | Excel Discussion (Misc queries) | |||
Copying A Worksheet From Each Open Workbook to an new Workbook | Excel Worksheet Functions | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions |