![]() |
Problem adding multiple worksheets
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 |
Problem adding multiple worksheets
Shorten the last name by 1 character and all should be well
"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 |
Problem adding multiple worksheets
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 |
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 |
All times are GMT +1. The time now is 08:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com