adding worksheets

bschulze

Active Member
Joined
Jun 2, 2005
Messages
289
I am looking to add worksheets within a macro. I want to name this worksheet in the same piece of code if possible. This is what I have so far but I cant figure it out.


Sheets.Add Type:="Worksheet"




Any help would be great
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,057
Office Version
  1. 365
Platform
  1. Windows
Not 100% sure what you want but try something like this.
Code:
Set wsNew = Worksheets.Add

wsNew.Name = "New Worksheet"
 

Watch MrExcel Video

Forum statistics

Threads
1,118,436
Messages
5,572,104
Members
412,441
Latest member
kelethymos
Top