F
funkymonkUK
Hi
It got the following code
Code:
--------------------
Sub viewtables()
'
Sheets("menu").Range("h3").Value = 1
Sheets("Tables(MAIN)").Copy after:=Sheets(Sheets.Count)
Sheets("Tables(MAIN) (2)").Select
Sheets("Tables(MAIN) (2)").Name = "Tables"
findshapes
Range("d1").Value = ""
Range("A1").Select
Sheets("menu").Range("h3").Value = ""
--------------------
If works perfect on my machine which has excel 2000 however if I go to
a machien with 97 on it comes up with the following error Runtime Error
1004 copy method of worksheet class failed. And breaks at the
"sheets.copy after " part.
Any idea why as I have recorded a macro on excel 97 and it come out
with exactly the same lines.
It got the following code
Code:
--------------------
Sub viewtables()
'
Sheets("menu").Range("h3").Value = 1
Sheets("Tables(MAIN)").Copy after:=Sheets(Sheets.Count)
Sheets("Tables(MAIN) (2)").Select
Sheets("Tables(MAIN) (2)").Name = "Tables"
findshapes
Range("d1").Value = ""
Range("A1").Select
Sheets("menu").Range("h3").Value = ""
--------------------
If works perfect on my machine which has excel 2000 however if I go to
a machien with 97 on it comes up with the following error Runtime Error
1004 copy method of worksheet class failed. And breaks at the
"sheets.copy after " part.
Any idea why as I have recorded a macro on excel 97 and it come out
with exactly the same lines.