ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Insert Worksheet (https://www.excelbanter.com/excel-discussion-misc-queries/122325-insert-worksheet.html)

ronnomad

Insert Worksheet
 
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from the
various worksheets and would prefer that the summary be the first sheet.
Insert does exactly that, and I do not see an option to put the new worksheet
before or after the current sheet.

Thanks,

Ron R.

Don Guillett

Insert Worksheet
 
Sub addsheet()
'Worksheets.Add after:=Sheets(Worksheets.Count) 'last
Worksheets.Add befo=Sheet1 'first
End Sub

--
Don Guillett
SalesAid Software

"ronnomad" wrote in message
...
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from the
various worksheets and would prefer that the summary be the first sheet.
Insert does exactly that, and I do not see an option to put the new
worksheet
before or after the current sheet.

Thanks,

Ron R.




Bernard Liengme

Insert Worksheet
 
These will do the trick

Sub AddFirst()
Sheets.Add befo=Sheets(1)
End Sub


Sub AddLast()
Sheets.Add After:=Sheets(Sheets.Count)
End Sub

Need help with VBA? See David McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from the
various worksheets and would prefer that the summary be the first sheet.
Insert does exactly that, and I do not see an option to put the new
worksheet
before or after the current sheet.

Thanks,

Ron R.




ronnomad

Insert Worksheet
 
Thanks to both Bernard & Don.

However, it seems to me that, where one wants to add a worksheet should be
an option on the insert menu.

Ron R.

"Bernard Liengme" wrote:

These will do the trick

Sub AddFirst()
Sheets.Add befo=Sheets(1)
End Sub


Sub AddLast()
Sheets.Add After:=Sheets(Sheets.Count)
End Sub

Need help with VBA? See David McRitchie's site on "getting started" with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from the
various worksheets and would prefer that the summary be the first sheet.
Insert does exactly that, and I do not see an option to put the new
worksheet
before or after the current sheet.

Thanks,

Ron R.





Bernard Liengme

Insert Worksheet
 
It is an option - Insert | Worksheet will insert a new worksheet before the
active worksheet. So if you click the tab of the first worksheet and use
this command you will get a new "first" worksheet. But if you want one at
the end you will need to drag the new one into place.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Thanks to both Bernard & Don.

However, it seems to me that, where one wants to add a worksheet should be
an option on the insert menu.

Ron R.

"Bernard Liengme" wrote:

These will do the trick

Sub AddFirst()
Sheets.Add befo=Sheets(1)
End Sub


Sub AddLast()
Sheets.Add After:=Sheets(Sheets.Count)
End Sub

Need help with VBA? See David McRitchie's site on "getting started" with
VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from
the
various worksheets and would prefer that the summary be the first
sheet.
Insert does exactly that, and I do not see an option to put the new
worksheet
before or after the current sheet.

Thanks,

Ron R.







danielocope

Insert Worksheet
 
Right click on the work sheet tab, a pop up window will give you all the
options you need, you can drag any tab to any location just by clicking and
holding while moving your mouse but the popup gives you all the options, play
with it and in 3 min, you will have it mastered.
All the VB code you were given is good and will do that also, but you may
not want to go through all that coding work to simply click and add or copy a
sheet.

Good Luck
Dan
Please rate this response, thank you!


"Bernard Liengme" wrote:

It is an option - Insert | Worksheet will insert a new worksheet before the
active worksheet. So if you click the tab of the first worksheet and use
this command you will get a new "first" worksheet. But if you want one at
the end you will need to drag the new one into place.
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Thanks to both Bernard & Don.

However, it seems to me that, where one wants to add a worksheet should be
an option on the insert menu.

Ron R.

"Bernard Liengme" wrote:

These will do the trick

Sub AddFirst()
Sheets.Add befo=Sheets(1)
End Sub


Sub AddLast()
Sheets.Add After:=Sheets(Sheets.Count)
End Sub

Need help with VBA? See David McRitchie's site on "getting started" with
VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"ronnomad" wrote in message
...
Is there a way to:

Add a new worksheet so that it is the first in a workbook?

Add a new worksheet so that it is the last in a workbook?

At times, after creating a workbook, I want to summarize the data from
the
various worksheets and would prefer that the summary be the first
sheet.
Insert does exactly that, and I do not see an option to put the new
worksheet
before or after the current sheet.

Thanks,

Ron R.








All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com