If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Why does code work in Excel 2000 but not in 2002
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 |
#2
|
|||
|
|||
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.) "La Durande" wrote in message ... 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 |
#3
|
|||
|
|||
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 "Sonia" wrote: 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.) "La Durande" wrote in message ... 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 |
#4
|
|||
|
|||
Yes. You'll need to re-post the question. Thanks for your patience.
"La Durande" wrote in message ... 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 "Sonia" wrote: 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.) "La Durande" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel 2000 vs 2002 Sheet protection & Validation cells | Andre Croteau | General Discussion | 4 | July 17th, 2004 03:31 PM |
Excel 2000 vs Excel 2002 | Harald Staff | Worksheet Functions | 1 | April 16th, 2004 11:14 AM |
Lookup and Offset (Excel 2000) | Bill J. | Worksheet Functions | 4 | February 3rd, 2004 09:15 AM |
Hyperlink between excel 2002 & excel 2000 | Sue | Worksheet Functions | 0 | January 29th, 2004 05:30 AM |