![]() |
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! |
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! |
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! |
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! |
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. |
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. |
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. |
What is Error "Method "Paste" of object "_Worksheet" failed?
- No. It's never used by more than one user at a time
- Yes. Thank you for your help. I had to re-write the whole thing bypassing the issue. I made it work without copy/cut/paste. Thanks you again "sebastienm" wrote: - 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. |
All times are GMT +1. The time now is 07:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com