Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code works with Excel 2000 but not with Excel 2002
Still doesn't work with Excel 2002. Gives run time error code 1004
Application-defined or object-defined error "La Durande" wrote: the following VBA works with Excel 2000 but gives error 1004 when used with Excel 2002 (XP) ' ' 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 Have "repaired" Office XP Pro but still won't work |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code works with Excel 2000 but not with Excel 2002 | Excel Programming | |||
Code works with Excel 2000 but not with Excel 2002 | Excel Programming | |||
code works in excel 2002, but not in excel 2003 | Excel Programming | |||
Excel 2000 VBA Code not working in Excel 2002 | Excel Programming | |||
VBA Code Works in 97, Not in 2002 | Excel Programming |