ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Selection.PasteSpecial with Office 2003 (https://www.excelbanter.com/excel-programming/344596-selection-pastespecial-office-2003-a.html)

Andreas Szabo

Selection.PasteSpecial with Office 2003
 
Hi Newsgroup

I have the following VBA-Code in an Excel-Sheet to copy from the clipboard:

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

That works good, but after the change to Office 2003 i have a performance
problem
with the Selection.PasteSpecial.

Have anyone an idea to make it fast?

Thanks and greetings
Andy




al

Selection.PasteSpecial with Office 2003
 
In order to copy and paste a range, it need not be selected.
This should improve performance.

Sub test()
Range("a1").Copy
Range("b1").PasteSpecial xlValues
End Sub

"Andreas Szabo" wrote:

Hi Newsgroup

I have the following VBA-Code in an Excel-Sheet to copy from the clipboard:

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

That works good, but after the change to Office 2003 i have a performance
problem
with the Selection.PasteSpecial.

Have anyone an idea to make it fast?

Thanks and greetings
Andy





Dave Peterson

Selection.PasteSpecial with Office 2003
 
I don't see anything in your snippet of code that would cause a slowdown.

Maybe you added a worksheet event that fires when you make a change and the
paste special causes that to fire...

application.enableevents = false
'your code to paste
application.enableevents = true



Andreas Szabo wrote:

Hi Newsgroup

I have the following VBA-Code in an Excel-Sheet to copy from the clipboard:

Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=True

That works good, but after the change to Office 2003 i have a performance
problem
with the Selection.PasteSpecial.

Have anyone an idea to make it fast?

Thanks and greetings
Andy


--

Dave Peterson


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com