×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Excel Worksheets.Add

Excel Worksheets.Add

Excel Worksheets.Add

(OP)
These used to work just fine but now I get an error:

 Set Summary = Worksheets.Add
 Summary.Name = "Summary"

  
 Set NewSheet = Worksheets.Add
 NewSheet.Name = "Spec_Summary"

I get:

Run-time error'1004'
Method 'Add' of object 'Sheets" failed

Any ideas on what caused this or what I can do to fix it?

Thanks,

Roger

RE: Excel Worksheets.Add

Have you upgraded to a different version of Excel?  I often find errors like this after upgrading because Microsoft changes little things.

RE: Excel Worksheets.Add

(OP)
Not that I know of.  I'll have to check.  We're supposed to move to Office 2003 but that hasn't happened yet.

RE: Excel Worksheets.Add

Has Excel possibly been recently re-installed?  Each time a machine is "re-imaged" (or a new machine is installed) at work, we have to install a couple of the add-ins to get some of our regularly-used functions to work (such as "EDATE" in the Analysis ToolPak).

Looking at the ToolPaks available here, a couple have appear to be VBA related, i.e. Analysis ToolPak - VBA.

The above probably doesn't apply, but might be worth pursuing.

-InspEngr

RE: Excel Worksheets.Add

Have you tried manually adding a worksheet (Insert/Worksheet in Excel)? Maybe the workbook is protected, or something similar.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

RE: Excel Worksheets.Add

(OP)
joerd,

You are right as always.  I can't insert a worksheet manually.  However, neither the workbook or worksheet is protected as far as I can tell.  I can open, edit, and save without a password and it's not shared; but I can't insert a worksheet.  What am I missing?

RE: Excel Worksheets.Add

(OP)
joerd,

I figured it out. I had locked a few cells and password protected as a test.  I placed this out on the network so others would have access and we were playing around with security ideas weeks ago.  I forgot to remove the protection when we were finished.  I took a stab at passwords for awhile until I got it right.  It was something I've never used before or since so blind luck and stupidity has saved my butt again.  Now where did I put those lottery numbers.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close