Error in Copy/Paste

O

Otto Moehrbach

Excel 2003, Win XP

I am helping an OP in Britain and he is getting an error with my code that I
am not getting on my machine. He has Excel 2002

Basically, the task at hand (at the point of the error) is a simple copy &
paste of the entries in an Invoice form to a single row on another sheet for
storage purposes.

The highlighted code is:

Dest(, 3).PasteSpecial Transpose:=True



The error message is a new one for me. It states:

Run-time error'-2147417848(80010108)
Automation error
The object invoked has disconnected from its clients.



Does anyone have any ideas as to what could be happening? Is it a UK thing?

Thanks for your help. Otto


The complete macro is:

Sub StoreInvoice()

Dim i As Range

Dim Dest As Range

Dim c As Long

With Sheets("Invoice Storage")

If .[A2] = "" Then

Set Dest = .[A2]

Else

Set Dest = .Range("A" & Rows.Count).End(xlUp)(2)

End If

Dest = [F15]

Dest(, 2) = [C9]

Range("C10:C13").Copy

Dest(, 3).PasteSpecial Transpose:=True 'Highlighted code

Dest(, 7) = [C15]

Dest(, 8) = [H15]

Dest(, 8).NumberFormat = "m/d/yyyy;@"

c = 2

For Each i In Range("LineRng")

i.Resize(, 7).Copy

Dest(, c + 7).PasteSpecial xlPasteValues

c = c + 7

Next i

[C30:C35].Copy

Dest(, 79).PasteSpecial Paste:=xlPasteValues, Transpose:=True

[E31:F31].Copy Dest(, 85)

[H30:H32].Copy

Dest(, 87).PasteSpecial Paste:=xlPasteValues, Transpose:=True

End With

Application.CutCopyMode = False

End Sub
 
N

Nigel

A refrence to this is covered in the following link, I don't think it is a
UK thing, more an environment thing.

http://support.microsoft.com/defaul...port/kb/articles/Q192/1/29.asp&NoWebContent=1


Otto Moehrbach said:
Excel 2003, Win XP

I am helping an OP in Britain and he is getting an error with my code that I
am not getting on my machine. He has Excel 2002

Basically, the task at hand (at the point of the error) is a simple copy &
paste of the entries in an Invoice form to a single row on another sheet for
storage purposes.

The highlighted code is:

Dest(, 3).PasteSpecial Transpose:=True



The error message is a new one for me. It states:

Run-time error'-2147417848(80010108)
Automation error
The object invoked has disconnected from its clients.



Does anyone have any ideas as to what could be happening? Is it a UK thing?

Thanks for your help. Otto


The complete macro is:

Sub StoreInvoice()

Dim i As Range

Dim Dest As Range

Dim c As Long

With Sheets("Invoice Storage")

If .[A2] = "" Then

Set Dest = .[A2]

Else

Set Dest = .Range("A" & Rows.Count).End(xlUp)(2)

End If

Dest = [F15]

Dest(, 2) = [C9]

Range("C10:C13").Copy

Dest(, 3).PasteSpecial Transpose:=True 'Highlighted code

Dest(, 7) = [C15]

Dest(, 8) = [H15]

Dest(, 8).NumberFormat = "m/d/yyyy;@"

c = 2

For Each i In Range("LineRng")

i.Resize(, 7).Copy

Dest(, c + 7).PasteSpecial xlPasteValues

c = c + 7

Next i

[C30:C35].Copy

Dest(, 79).PasteSpecial Paste:=xlPasteValues, Transpose:=True

[E31:F31].Copy Dest(, 85)

[H30:H32].Copy

Dest(, 87).PasteSpecial Paste:=xlPasteValues, Transpose:=True

End With

Application.CutCopyMode = False

End Sub
 
O

Otto Moehrbach

Nigel

I appreciate your response. I read the article and I don't see
a connection between what I have and what the article discusses. I don't
have a UserForm nor do I call one. In fact, this macro doesn't call
anything nor pass anything.

The sheet has a scattering of data as you would have in an
Invoice. The macro does nothing more than copy each user entry and paste it
in a single row on another sheet for storage purposes.

The most baffling aspect of this error is that it occurs on his
machine and not on mine. Thanks again for your help. Otto



Nigel said:
A refrence to this is covered in the following link, I don't think it is a
UK thing, more an environment thing.

http://support.microsoft.com/defaul...port/kb/articles/Q192/1/29.asp&NoWebContent=1


Otto Moehrbach said:
Excel 2003, Win XP

I am helping an OP in Britain and he is getting an error with my code
that
I
am not getting on my machine. He has Excel 2002

Basically, the task at hand (at the point of the error) is a simple copy &
paste of the entries in an Invoice form to a single row on another sheet for
storage purposes.

The highlighted code is:

Dest(, 3).PasteSpecial Transpose:=True



The error message is a new one for me. It states:

Run-time error'-2147417848(80010108)
Automation error
The object invoked has disconnected from its clients.



Does anyone have any ideas as to what could be happening? Is it a UK thing?

Thanks for your help. Otto


The complete macro is:

Sub StoreInvoice()

Dim i As Range

Dim Dest As Range

Dim c As Long

With Sheets("Invoice Storage")

If .[A2] = "" Then

Set Dest = .[A2]

Else

Set Dest = .Range("A" & Rows.Count).End(xlUp)(2)

End If

Dest = [F15]

Dest(, 2) = [C9]

Range("C10:C13").Copy

Dest(, 3).PasteSpecial Transpose:=True 'Highlighted code

Dest(, 7) = [C15]

Dest(, 8) = [H15]

Dest(, 8).NumberFormat = "m/d/yyyy;@"

c = 2

For Each i In Range("LineRng")

i.Resize(, 7).Copy

Dest(, c + 7).PasteSpecial xlPasteValues

c = c + 7

Next i

[C30:C35].Copy

Dest(, 79).PasteSpecial Paste:=xlPasteValues, Transpose:=True

[E31:F31].Copy Dest(, 85)

[H30:H32].Copy

Dest(, 87).PasteSpecial Paste:=xlPasteValues, Transpose:=True

End With

Application.CutCopyMode = False

End Sub




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
T

Thierry zen Ruffinen

Otto,

Regarding your post on developersdex.com dated march 13th, I'd like to
inform you that I encoutered the same problem by getting the same excel
error message.

After a little search, I checked with my IT department and learned that
it was a bug generated within Microsoft Excel. The following link to the
relevant Microsoft Knowledge Base Article should help you do what you
have to fix the problem :
http://support.microsoft.com/default.aspx?kbid=813120

I hope this was useful for you.

Regards,

Thierry
 

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

Top