LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default How do I insert a new worksheet consecutively?

You could use a macro like this:

Option Explicit
Sub InsertWorksheets()
Dim HowMany As Long
Dim iCtr As Long

HowMany = CLng(Application.InputBox(Prompt:="How many?", Type:=1))

For iCtr = 1 To HowMany
Worksheets.Add after:=ActiveSheet
Next iCtr

End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Then to run it, you can just:
tools|macro|macros (or alt-F8)
select InsertWorkbooks and click run

The workbook with the macro in it needs to be open.

Carole Drake wrote:

I'm kind of new to macros - how would you go about using one for this?

"Dave Peterson" wrote:

Even inserting from the Insert|worksheet will insert before the activesheet.

I think if the OP wants more control, a macro would be in order.


"lady-pearl" wrote:

On my current Workbook I would like to insert anywhere from 1 - 10 extra
worksheets, but I notice that when I do the "insert worksheet" they are not
always consecutive. I am finding that I have to drag them back to the place
where I want them to appear originally.

Thanks!

Pearl

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
 
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
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Protect Worksheet but allow to insert or delete rows Bob L Hilliard Excel Discussion (Misc queries) 2 June 9th 05 02:08 PM
Insert comment in protected worksheet The Tuner Excel Worksheet Functions 2 June 6th 05 11:38 PM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
Insert worksheet ParTeeGolfer Excel Worksheet Functions 1 January 10th 05 07:03 PM


All times are GMT +1. The time now is 04:51 PM.

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

About Us

"It's about Microsoft Excel"