Excel 97 Worksheet copy in vba problem...

freds45

New Member
Joined
May 19, 2003
Messages
13
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 ?
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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)
 
Upvote 0
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 ?
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,047
Members
449,064
Latest member
scottdog129

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top