Results 1 to 4 of 4

Excel 97 Worksheet copy in vba problem...

This is a discussion on Excel 97 Worksheet copy in vba problem... within the Excel Questions forums, part of the Question Forums category; Hi all I wrote some vba code with Excel 2000 to copy a model worksheet to new ones, and it ...

  1. #1
    New Member
    Join Date
    May 2003
    Posts
    13

    Default Excel 97 Worksheet copy in vba problem...

    Hi all

    I wrote some vba code with Excel 2000 to copy a model worksheet to new ones, and it has to work with Excel 97...
    Here is the code I used:
    Code:
        Worksheets(modele).Copy After:=Worksheets(i)
    It works great with Excel 2000, but in Excel 97, it always fails
    I do not have vbaxl8.hlp to check the syntax, but it should be the same.

    Can anyone help ?

  2. #2
    Board Regular
    Join Date
    Feb 2003
    Location
    Luton, England.
    Posts
    8,107

    Default Re: Excel 97 Worksheet copy in vba problem...

    Nothing wrong with the syntax. Must be a problem with your variables not being valid. This is the general method :-

    Workheets("Sheet1").Copy After:=Worksheets(1)
    Regards
    BrianB (using XL2003 & 2010)
    Most problems occur from starting at the wrong place.
    Use a cup of coffee to speed up all Windows processes.
    It is easy until you know how.
    **FORMATTED/COMMENTED CODE IS MORE LIKELY TO GET A REPLY

  3. #3
    New Member
    Join Date
    May 2003
    Posts
    13

    Default Re: Excel 97 Worksheet copy in vba problem...

    Well, I tried this, but it does not work neither
    I can't see where the problem is!

    What I have before is :

    Code:
    Const modele As String = "modele"
    Anyone has an idea ? Is it because I designed it first with Excel 2000 ?

  4. #4
    New Member
    Join Date
    May 2003
    Posts
    13

    Default Re: Excel 97 Worksheet copy in vba problem...

    help

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com