PC Review


Reply
Thread Tools Rate Thread

Creating New Worksheets & Sorting Order of Worksheets

 
 
Orion Cochrane
Guest
Posts: n/a
 
      8th Dec 2009
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.
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      8th Dec 2009
#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 here:
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Order for Worksheets Orion Cochrane Microsoft Excel Programming 1 12th Jan 2010 04:20 PM
Creating new worksheets and appending data from multiple worksheets. Dow Microsoft Excel Programming 5 11th Mar 2008 07:04 PM
VBA / Macro for creating new worksheets and new columns from existing worksheets webby2006 Microsoft Excel Programming 3 25th Jul 2006 03:38 PM
Sorting Worksheets in Alphabetical Order (Left to Right) Jako Microsoft Excel Programming 2 9th Jun 2004 01:01 AM
Sort Numerically Worksheets via VB when creating a new worksheets John Microsoft Excel Programming 6 1st Jun 2004 07:21 AM


Features
 

Advertising
 

Newsgroups
 


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