A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Why does code work in Excel 2000 but not in 2002



 
 
Thread Tools Display Modes
  #1  
Old September 17th, 2004, 02:25 PM
La Durande
external usenet poster
 
Posts: n/a
Default 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  
Old September 17th, 2004, 04:30 PM
Sonia
external usenet poster
 
Posts: n/a
Default

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  
Old September 17th, 2004, 04:57 PM
La Durande
external usenet poster
 
Posts: n/a
Default

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  
Old September 17th, 2004, 05:59 PM
Sonia
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.