Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Creating New Worksheets & Sorting Order of Worksheets

I have a file with tracking information. One worksheet has the names of all
the people I am tracking, each with their own worksheet. I also have a
UserForm that is used to add people. I would like the following 2 things to
happen (more than likely in my cmdOK_Click event):
1 - Copy a worksheet from one of my existing people, blank out the info, and
rename it the value in my Name field in my UserForm (I used to know how to do
this, but it was last year when I last had the code);
2 - Sort the placement of the worksheets with the people I'm tracking so it
is in the same order as my master worksheet with all the people listed. (I do
not want all the worksheets reordered; just the ones for the people I'm
tracking.)

Any help on this is greatly appreciated, as others will be using this file.
TIA.
--
I am running on Office 2003, unless otherwise stated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Creating New Worksheets & Sorting Order of Worksheets

#1. I think I would create a template worksheet (and hide it???). It could be
set up perfectly, but without the data.

Then use that to create the new worksheet.

You can record a macro when you do the copy and rename to get the code.

#2. Chip Pearson and David McRitchie share code to sort sheets:

Chip Pearson's:
http://www.cpearson.com/excel/sortws.htm

David McRitchie's:
http://www.mvps.org/dmcritchie/excel...#sortallsheets

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Orion Cochrane wrote:

I have a file with tracking information. One worksheet has the names of all
the people I am tracking, each with their own worksheet. I also have a
UserForm that is used to add people. I would like the following 2 things to
happen (more than likely in my cmdOK_Click event):
1 - Copy a worksheet from one of my existing people, blank out the info, and
rename it the value in my Name field in my UserForm (I used to know how to do
this, but it was last year when I last had the code);
2 - Sort the placement of the worksheets with the people I'm tracking so it
is in the same order as my master worksheet with all the people listed. (I do
not want all the worksheets reordered; just the ones for the people I'm
tracking.)

Any help on this is greatly appreciated, as others will be using this file.
TIA.
--
I am running on Office 2003, unless otherwise stated.


--

Dave Peterson
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
Does the order of worksheets matter ? kittronald Excel Worksheet Functions 1 August 20th 11 06:56 PM
Creating new worksheets and appending data from multiple worksheets. Dow Excel Programming 5 March 11th 08 07:04 PM
VBA / Macro for creating new worksheets and new columns from existing worksheets webby2006 Excel Programming 3 July 25th 06 03:38 PM
Sorting Worksheets in Alphabetical Order (Left to Right) Jako[_14_] Excel Programming 2 June 9th 04 01:01 AM
Sort Numerically Worksheets via VB when creating a new worksheets John Excel Programming 6 June 1st 04 07:21 AM


All times are GMT +1. The time now is 09:56 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"