|
-
Feb 18th, 2005, 03:42 PM
#1
Thread Starter
Member
copying excel sheets
If I use the following code to copy a sheet of an excel file :
Sheet,application.worksheets("oldname").copy _
after:=Sheet.application.worksheets("oldname")
the result is O.K.!! : a new sheet (copy of the oldsheet) with the name oldname(2)
But now if either I want to copy oldname(2) to a new sheet or to rename oldname(2) using function renamesheet the result is error "9" (subindex out of the interval). It looks as if the code does not understand a sheet whose name is "oldname(2)". Ir doesn't understand the parenthesis (2). Any help? Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|