ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Urgent Please: PasteSpecial not working. Very wierd (https://www.excelbanter.com/excel-programming/367390-urgent-please-pastespecial-not-working-very-wierd.html)

michael.beckinsale

Urgent Please: PasteSpecial not working. Very wierd
 
Hi All,

Very strange problem.

I am in the middle of developing a workbook which has many paste
special operations carried out using the VBA code below. Over the past
6 weeks or so all the code in all the modules / forms has worked fine
using same code. Now whenever the code reaches this line in any of the
modules / forms it crashes! I have tried re-booting and different
computers but the problem remains. Is there any way that paste special
can be turned of ?

Workbook has been developed to work on XL2000 upwards. I noticed that
recording on XlL2003 produces Paste:=xlPasteValues but changing that
does not make any difference.

All suggestions gratefully received


Selection.PasteSpecial Paste:=xlValues

Regards

Michael Beckinsale


Don Guillett

Urgent Please: PasteSpecial not working. Very wierd
 
instead of copy/paste loading up the clipboard, try
range("a1:x21").value = range("b1:y21").value
notice the ranges must be the same size

--
Don Guillett
SalesAid Software

"michael.beckinsale" wrote in message
ups.com...
Hi All,

Very strange problem.

I am in the middle of developing a workbook which has many paste
special operations carried out using the VBA code below. Over the past
6 weeks or so all the code in all the modules / forms has worked fine
using same code. Now whenever the code reaches this line in any of the
modules / forms it crashes! I have tried re-booting and different
computers but the problem remains. Is there any way that paste special
can be turned of ?

Workbook has been developed to work on XL2000 upwards. I noticed that
recording on XlL2003 produces Paste:=xlPasteValues but changing that
does not make any difference.

All suggestions gratefully received


Selection.PasteSpecial Paste:=xlValues

Regards

Michael Beckinsale




michael.beckinsale

Urgent Please: PasteSpecial not working. Very wierd
 

Don,

Thanks for your reply.

I dont have the time to replace all the relevant code at the moment.

Is there a way to 'empty' the clipboard via VBA?

Regards

Michael beckinsale



All times are GMT +1. The time now is 11:40 PM.

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