View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
pokdbz pokdbz is offline
external usenet poster
 
Posts: 43
Default Problem adding multiple worksheets

Great thanks

"Kevin B" wrote:

Your last worksheet name, AMCON DISTRIBUTING - SPRINGFIELD, is one character
beyond the tab name maximumn of 31 characters.

Try abbreviating it to AMCON DISTRIB - SPRINGFIELD or something along those
lines.


--
Kevin Backmann


"pokdbz" wrote:

I'm using this to add mulitple work sheets

Set ws = Worksheets.Add
ws.Name = sheetName ' error line

I am pulling sheetName from another worksheet and am getting an error when
it goes to make the 3rd worksheet.

The error message:
Runtime error '1004'
Application defined or object defined error

I'm not sure what the problem is since it makes two worksheets fine and
fails on the third.

These are the worksheet names it creates in this order.
AJ SILBERMAN & CO
AMCON DISTRIBUTING CO - OMAHA
AMCON DISTRIBUTING - SPRINGFIELD