Problem with inserting new sheets

bullionbuks

New Member
Joined
May 27, 2004
Messages
12
For some reason when I insert a new sheet into a workbook 3 sheets show up. How can I change the default insert back to 1 sheet at a time.

Thanks,
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Welcome to the Board!

Can you describe how you are inserting the new worksheets?
You are selecting multiple tabs before inserting, are you?
Also, which version of Excel are you using?
 
Upvote 0
I am using excel 2007 and using the shift F11 shortcut. I have tried using the right click method and I am getting the same results. I am not selecting multiple tabs only one at a time. If any other details could be useful let me know.

Thx
 
Upvote 0
How many sheets are there before you insert new ones (1 or 3)?
 
Upvote 0
So, you are saying if you start with 3, and try to insert one, you get 6.
And you start with 1, and try to insert one, you get 4?

Try this. Turn on your macro recorder, select any one sheet, and then try inserting one sheet. Then stop the macro recorder, and paste the code you created with the recorder back here. I am interested to see what Excel is doing to cause this.

I have Excel 2007 and looked for any setting that would cause this, and cannot find one. There is a setting for how many sheets you want new workbooks to have, but I cannot find anything that would seem to affect number of sheets inserted.
 
Upvote 0
Can you do me just one more favor?
After you start the macro, but before you insert a sheet, can you move around between sheets? I just want to make sure it is not holding some multiple sheet selection.
 
Upvote 0
Sub Insert_Sheet_Ex()
'
' Insert_Sheet_Ex Macro
'

'
ActiveSheet.Next.Select
ActiveSheet.Next.Select
ActiveSheet.Previous.Select
ActiveSheet.Previous.Select
ActiveSheet.Next.Select
ActiveSheet.Next.Select
Sheets.Add Type:="Worksheet"
End Sub
 
Upvote 0
Hmmm, that adds exactly one sheet for me.

I took your code and added some counters to it. Can you run this code, and tell me what the message box returns?
Code:
Sub Insert_Sheet_Ex()
'
' Insert_Sheet_Ex Macro
'
    Dim OrigSheetCount As Integer
    Dim FinalSheetCount As Integer
 
    OrigSheetCount = Sheets.Count
 
    ActiveSheet.Next.Select
    ActiveSheet.Next.Select
    ActiveSheet.Previous.Select
    ActiveSheet.Previous.Select
    ActiveSheet.Next.Select
    ActiveSheet.Next.Select
    Sheets.Add Type:="Worksheet"
 
    FinalSheetCount = Sheets.Count
 
    MsgBox "Original Sheet Count: " & OrigSheetCount & vbCrLf & "Final Sheet Count: " & FinalSheetCount
 
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,774
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top