Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy worksheet from one workbook to a master workbook mvannatta Excel Worksheet Functions 3 April 15th 09 08:32 PM
Relocation Moving Movers Los Angeles CA linkswanted Excel Discussion (Misc queries) 0 January 27th 08 03:06 AM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
Copying A Worksheet From Each Open Workbook to an new Workbook carl Excel Worksheet Functions 1 January 3rd 06 05:37 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 12:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"