+ Reply to Thread
Results 1 to 2 of 2

copy and rename sheets

  1. #1
    Registered User
    Join Date
    07-20-2006
    Posts
    4

    copy and rename sheets

    Say I have an excell file titled "Form_2" that has a sheet named DATABASE. I have another excell titled "DATABASE". I have a macro in Form_2 that opens the file "DATABASE" and copies the sheet "DATABASE" to the file "DATABASE". The macro then renames the Database sheet in the database file to 2006.

    If there is already a sheet in database file named 2006 how do I delete it since you can't have two sheets with the same name?

    Thanks

    Max

  2. #2
    Forum Contributor
    Join Date
    11-29-2003
    Posts
    1,203
    Two methods. The enumeration method and the "use the error object" method.

    Please Login or Register  to view this content.
    I use them both, depending on the circumstances and my frame of mind that day.

    I should mention ... if there is a CHART sheet named 2006, the way I have coded it would create an error. In that case, DO NOT dimension ws as Worksheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1