ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   pastespecial question (https://www.excelbanter.com/excel-programming/329721-pastespecial-question.html)

Paul

pastespecial question
 
Hi,

I trying to get some code to run invisibly to the user. The code is:

WksSource.Range("testing").Copy
WksRaw.Range("A1").PasteSpecial xlPasteValues

This works fine but the user can see whats happening.

I've tried:

WksSource.Range("testing").Copy _
Destination: WksRaw.Range("A1").PasteSpecial xlPasteValues

but this won't allow the pastespecial method which is required. Is this a
syntax issue or is there some otherway I can copy and PastSpecial without
the code visibly switching between sheets.

Thanks in advance



[email protected]

pastespecial question
 
Paul,
Application.ScreenUpdating = False
Donna


Peter Rooney

pastespecial question
 
Paul,

Have you tried

application.screenupdating=false

before you run your code, then

application.screenupdating=true

at the end of the macro?

Hope this helps

Pete


"Paul" wrote:

Hi,

I trying to get some code to run invisibly to the user. The code is:

WksSource.Range("testing").Copy
WksRaw.Range("A1").PasteSpecial xlPasteValues

This works fine but the user can see whats happening.

I've tried:

WksSource.Range("testing").Copy _
Destination: WksRaw.Range("A1").PasteSpecial xlPasteValues

but this won't allow the pastespecial method which is required. Is this a
syntax issue or is there some otherway I can copy and PastSpecial without
the code visibly switching between sheets.

Thanks in advance




Paul

pastespecial question
 
Thanks for the reply Donna,

I tried that but after

WksSource.Range("testing").Copy

I can see the range being highlighted for copying ( Same as if you Ctrl +
C). Even when the procedure ends the range remain highlighted

Any other suggestions?


wrote in message
oups.com...
Paul,
Application.ScreenUpdating = False
Donna




Fred[_22_]

pastespecial question
 
Paul,
instead of using pastespecial to copy the value just set the value of the
cell.

WksRaw.Range("A1").Value = WksSource.Range("testing").Value

Fred



"Paul" <paulm dot c @ iol dot ie wrote in message
...
Hi,

I trying to get some code to run invisibly to the user. The code is:

WksSource.Range("testing").Copy
WksRaw.Range("A1").PasteSpecial xlPasteValues

This works fine but the user can see whats happening.

I've tried:

WksSource.Range("testing").Copy _
Destination: WksRaw.Range("A1").PasteSpecial xlPasteValues

but this won't allow the pastespecial method which is required. Is this a
syntax issue or is there some otherway I can copy and PastSpecial without
the code visibly switching between sheets.

Thanks in advance




arno

pastespecial question
 
I can see the range being highlighted for copying ( Same as if you
Ctrl + C). Even when the procedure ends the range remain highlighted


application.cutcopymode = false

will remove that.

arno


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

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