Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
vat vat is offline
external usenet poster
 
Posts: 5
Default What is Error "Method "Paste" of object "_Worksheet" failed?

I recorded the simpliest macro to move content of the cell A1 to the cell A2:

Range("A1").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste

It returned the following error message:

Run-time error '-2147417848 (80010108)':
Method "Paste" of object "_Worksheet" failed

I copied the macro into a new workbook and it worked OK. I can't find a
difference between the workbooks.

Please help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default What is Error "Method "Paste" of object "_Worksheet" failed?

Hi,
try:
Range("A1").Cut Range("a2")
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"vat" wrote:

I recorded the simpliest macro to move content of the cell A1 to the cell A2:

Range("A1").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste

It returned the following error message:

Run-time error '-2147417848 (80010108)':
Method "Paste" of object "_Worksheet" failed

I copied the macro into a new workbook and it worked OK. I can't find a
difference between the workbooks.

Please help!

  #3   Report Post  
Posted to microsoft.public.excel.programming
vat vat is offline
external usenet poster
 
Posts: 5
Default What is Error "Method "Paste" of object "_Worksheet" failed?

Thank you Sébastien, but it did not work. Now the error says

Run-time error '-2147417848 (80010108)':
Method "Cut" of object "Range" failed


"sebastienm" wrote:

Hi,
try:
Range("A1").Cut Range("a2")
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"vat" wrote:

I recorded the simpliest macro to move content of the cell A1 to the cell A2:

Range("A1").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste

It returned the following error message:

Run-time error '-2147417848 (80010108)':
Method "Paste" of object "_Worksheet" failed

I copied the macro into a new workbook and it worked OK. I can't find a
difference between the workbooks.

Please help!

  #4   Report Post  
Posted to microsoft.public.excel.programming
vat vat is offline
external usenet poster
 
Posts: 5
Default What is Error "Method "Paste" of object "_Worksheet" failed?

OK, sebastien, that's the real situation. I wrote a macro wich pulls data
from different files and processing it in a "central" file. The whole thing
is located on the network and works great from MY computer. However, if I
try to run it from any other computer in the office (using the same files -
they are on the network), I will get the error message. I copied the
PERSONAL.XLS file from my PC to other machines but it does not help. Any
idea?

"sebastienm" wrote:

Hi,
try:
Range("A1").Cut Range("a2")
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"vat" wrote:

I recorded the simpliest macro to move content of the cell A1 to the cell A2:

Range("A1").Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste

It returned the following error message:

Run-time error '-2147417848 (80010108)':
Method "Paste" of object "_Worksheet" failed

I copied the macro into a new workbook and it worked OK. I can't find a
difference between the workbooks.

Please help!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 227
Default What is Error "Method "Paste" of object "_Worksheet" failed?

Is the code in a Worksheet? If so, Range will fail for any Ranges
outside of the Worksheet in which the code resides.

Move the code to a Module if this is the case.



  #6   Report Post  
Posted to microsoft.public.excel.programming
vat vat is offline
external usenet poster
 
Posts: 5
Default What is Error "Method "Paste" of object "_Worksheet" failed?

The macro is in a Module. I am sure, the problem is in some local settings,
since the program executes good in one PC and does not work on another.

"Mark Lincoln" wrote:

Is the code in a Worksheet? If so, Range will fail for any Ranges
outside of the Worksheet in which the code resides.

Move the code to a Module if this is the case.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default What is Error "Method "Paste" of object "_Worksheet" failed?

- Is the book in shared mode?
- do all computers are running same OS/Office version?

I searched this newsgroup for similar issues (looking for "network error"):
----------------------------------------------------------------------------------
- "This'll stump you! Problem with Copy Sheet between Excel"
This is speculation but you may be having problems because of the
AccessMode specification. It might be hard to debug remotely but does
the client have problems with the 2nd (or subsequent) attempt to create
the file? If so, it increases the likelihood of the AccessMode causing
the problem.
Can you ensure that the file is always under exclusive control before
you try and overwrite it? Or, as a test, can you create a new file
name each time? Does the problem still occur?
If the file is on a network drive there might be additional
security/sharing issues introduced into the analysis by the network
management software.
Finally, you may want to search support.microsoft.com for your error:
http://support.microsoft.com/search/...t.aspx?query=%
22file+access+error%22
--
Regards,
Tushar Mehta
-----------------------------------------------------------------------------

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"vat" wrote:

The macro is in a Module. I am sure, the problem is in some local settings,
since the program executes good in one PC and does not work on another.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"method 'Copy' of object '_Worksheet' failed" Terry Holland Excel Programming 1 July 8th 05 04:25 PM
"GoalSeek method of Range object failed" error message Fixit_Steve Excel Programming 0 January 13th 05 07:29 PM
METHOD "SELECT" OF OBJECT '_WORKSHEET' FAILED when opening a file Mat Excel Programming 0 July 8th 04 05:13 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM
"Run-time error '1004'" Method 'Range' of object '_global' failed. haisat[_2_] Excel Programming 0 October 20th 03 12:13 PM


All times are GMT +1. The time now is 10:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"