Macros in Excel97/2000

  • Thread starter Thread starter Arlyn
  • Start date Start date
A

Arlyn

I built a macro in Excel 97 which does not work in Excel
2000. The specific error message is:
run-time error '-2147417848 (80010108)':
Method 'Paste' of object '_Worksheet' failed.
[End] [Debug] [Help]

The line at which it fails is: ActiveSheet.Paste
This is a simple cut and paste function which moves cell
data from one area of the spreadsheet to another. I have
already read the knowledge base article about using the
Standard toolbar buttons instead of the Clipboard ones and
that doesn't work. I also re-recorded that portion of the
macro in Excel 2000, and it doesn't work either.

Help!!
 
Here is the part dealing with that error. This is only
the first part of this macro. The whole thing is about 14
pages.
Range("F1:G312").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=4
Range("BQ1").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=-4
Columns("F:G").Select
Selection.Delete Shift:=xlToLeft
Range("A11").Select
-----Original Message-----
Hi

Post the code please. I'm sure it can be fixed.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Arlyn" <[email protected]> skrev i melding
I built a macro in Excel 97 which does not work in Excel
2000. The specific error message is:
run-time error '-2147417848 (80010108)':
Method 'Paste' of object '_Worksheet' failed.
[End] [Debug] [Help]

The line at which it fails is: ActiveSheet.Paste
This is a simple cut and paste function which moves cell
data from one area of the spreadsheet to another. I have
already read the knowledge base article about using the
Standard toolbar buttons instead of the Clipboard ones and
that doesn't work. I also re-recorded that portion of the
macro in Excel 2000, and it doesn't work either.

Help!!


.
 
It works perfect here with my Excel 2000. Sure the sheet is not protected in
any way ?

Also, you can shorten the code a lot to speed it up and make the same things
happen without the screen flickering:

Sub test()
Range("F1:G312").Cut Range("BQ1")
Columns("F:G").Delete Shift:=xlToLeft
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

Here is the part dealing with that error. This is only
the first part of this macro. The whole thing is about 14
pages.
Range("F1:G312").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=4
Range("BQ1").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=-4
Columns("F:G").Select
Selection.Delete Shift:=xlToLeft
Range("A11").Select
-----Original Message-----
Hi

Post the code please. I'm sure it can be fixed.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Arlyn" <[email protected]> skrev i melding
I built a macro in Excel 97 which does not work in Excel
2000. The specific error message is:
run-time error '-2147417848 (80010108)':
Method 'Paste' of object '_Worksheet' failed.
[End] [Debug] [Help]

The line at which it fails is: ActiveSheet.Paste
This is a simple cut and paste function which moves cell
data from one area of the spreadsheet to another. I have
already read the knowledge base article about using the
Standard toolbar buttons instead of the Clipboard ones and
that doesn't work. I also re-recorded that portion of the
macro in Excel 2000, and it doesn't work either.

Help!!


.
 
I'm sorry, but I get the same original message running
just your 2 line macro as I do with my original. Might I
need to reload Excel 2000??
-----Original Message-----
It works perfect here with my Excel 2000. Sure the sheet is not protected in
any way ?

Also, you can shorten the code a lot to speed it up and make the same things
happen without the screen flickering:

Sub test()
Range("F1:G312").Cut Range("BQ1")
Columns("F:G").Delete Shift:=xlToLeft
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

Here is the part dealing with that error. This is only
the first part of this macro. The whole thing is about 14
pages.
Range("F1:G312").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=4
Range("BQ1").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=-4
Columns("F:G").Select
Selection.Delete Shift:=xlToLeft
Range("A11").Select
-----Original Message-----
Hi

Post the code please. I'm sure it can be fixed.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Arlyn" <[email protected]> skrev i melding
I built a macro in Excel 97 which does not work in Excel
2000. The specific error message is:
run-time error '-2147417848 (80010108)':
Method 'Paste' of object '_Worksheet' failed.
[End] [Debug] [Help]

The line at which it fails is: ActiveSheet.Paste
This is a simple cut and paste function which moves cell
data from one area of the spreadsheet to another. I have
already read the knowledge base article about using the
Standard toolbar buttons instead of the Clipboard
ones
and
that doesn't work. I also re-recorded that portion
of
the
macro in Excel 2000, and it doesn't work either.

Help!!


.


.
 
Can you try either your code or Harald's on a test worksheet?

If it works there, maybe you could try another little experiment.

Try creating a new worksheet based on that other worksheet. And then run the
code.

I'm thinking that the worksheet could be bad (as in corrupted).

It's only happened to me with one workbook, but when I rebuilt that worksheet,
the problem went away (and it was those awful run-time errors).

(I don't think it's an excel problem--but it could be your excel workbook's
problem. And different versions of excel are sensitive to different problems.
Maybe xl97 wasn't sensitive enough to catch it.)
I'm sorry, but I get the same original message running
just your 2 line macro as I do with my original. Might I
need to reload Excel 2000??
-----Original Message-----
It works perfect here with my Excel 2000. Sure the sheet is not protected in
any way ?

Also, you can shorten the code a lot to speed it up and make the same things
happen without the screen flickering:

Sub test()
Range("F1:G312").Cut Range("BQ1")
Columns("F:G").Delete Shift:=xlToLeft
End Sub

--
HTH. Best wishes Harald
Followup to newsgroup only please

Here is the part dealing with that error. This is only
the first part of this macro. The whole thing is about 14
pages.
Range("F1:G312").Select
Selection.Cut
ActiveWindow.LargeScroll ToRight:=4
Range("BQ1").Select
ActiveSheet.Paste
ActiveWindow.LargeScroll ToRight:=-4
Columns("F:G").Select
Selection.Delete Shift:=xlToLeft
Range("A11").Select
-----Original Message-----
Hi

Post the code please. I'm sure it can be fixed.

--
HTH. Best wishes Harald
Followup to newsgroup only please

"Arlyn" <[email protected]> skrev i
melding
I built a macro in Excel 97 which does not work in Excel
2000. The specific error message is:
run-time error '-2147417848 (80010108)':
Method 'Paste' of object '_Worksheet' failed.
[End] [Debug] [Help]

The line at which it fails is: ActiveSheet.Paste
This is a simple cut and paste function which moves cell
data from one area of the spreadsheet to another. I
have
already read the knowledge base article about using the
Standard toolbar buttons instead of the Clipboard ones
and
that doesn't work. I also re-recorded that portion of
the
macro in Excel 2000, and it doesn't work either.

Help!!


.


.
 

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

Back
Top