Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

What is Error "Method "Paste" of object "_Worksheet" failed?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vat - 16 Feb 2006 19:32 GMT
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!
sebastienm - 16 Feb 2006 20:03 GMT
Hi,
try:
  Range("A1").Cut Range("a2")
Signature

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

> I recorded the simpliest macro to move content of the cell A1 to the cell A2:
>
[quoted text clipped - 12 lines]
>
> Please help!
vat - 16 Feb 2006 20:51 GMT
Thank you Sébastien, but it did not work.  Now the error says

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

> Hi,
> try:
[quoted text clipped - 16 lines]
> >
> > Please help!
vat - 16 Feb 2006 22:16 GMT
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?

> Hi,
> try:
[quoted text clipped - 16 lines]
> >
> > Please help!
Mark Lincoln - 16 Feb 2006 22:55 GMT
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.
vat - 17 Feb 2006 13:06 GMT
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.

> 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.
sebastienm - 17 Feb 2006 19:31 GMT
- 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/default.aspx?query=%
22file+access+error%22
Signature

Regards,
Tushar Mehta
-----------------------------------------------------------------------------

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

> 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.
vat - 17 Feb 2006 20:05 GMT
- 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

> - Is the book in shared mode?
> - do all computers are running same OS/Office version?
[quoted text clipped - 19 lines]
> > 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.