Why does code work in Excel 2000 but not in 2002

G

Guest

the following VBA works with Excel 2000 but gives error 1004 when used with
2002
'
' 14/09/2004 by Alf Dorrian
'
Range("A2:M73").Select
Selection.Copy
Workbooks.Add

Range("A2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=False
Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone,
SkipBlanks:=False _
, Transpose:=False


Application.CutCopyMode = False
Filesavename = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls")

If Filesavename <> False Then

(the code below this gives the error)
ActiveSheet.SaveAs Filename:=Filesavename, FileFormat:= _ xlNormal,
Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _ , CreateBackup:=False



End If
ActiveWorkbook.Close SaveChanges:=False
ActiveWorkbook.Close SaveChanges:=False

End Sub
 
S

Sonia

You've landed in the PowerPoint newsgroup instead of the Excel newsgroup. Can
you tell us what steps you followed when you posted your question? There seems
to be something somewhere in the system that is incorrectly routing questions to
the PowerPoint newsgroup. We would like to help Microsoft fix the problem so
those like yourself get the fastest and most accurate help possible.
--

Sonia Coleman
Microsoft PowerPoint MVP Team
Autorun Software, Templates and Tutorials
(Never test the depth of the water with both feet.)
 
G

Guest

I had searched by "Excel VBA" and arrived and posted my question in that group.

Hope answers your query.

Do I have to copy & re-post to Excel Programming ?

Regards

Alf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top