View Full Version : Script to paste only values in cell- Excel
Skopweb
09-11-2009, 04:27 AM
Hello All
I need help in creating a script for SheetA that should allow to paste values in a cell (like right click -> paste special -> values). Other options like formats, formulas should not be allowed
Regards
Skopweb
nst1107
09-11-2009, 06:31 AM
The method is .PasteSpecial. You can use Application.CutCopyMode = False to get rid of the dot highlight afterward if you need to.
Skopweb
09-11-2009, 10:40 PM
Can u help me with the script as i'm not literate at scripts
Thanks in advance
Skopweb
p45cal
09-12-2009, 05:00 AM
You don't need .PasteSpecial just to paste values.
Use the likes of
Range("A1")=Range("C22").value
to copy from C22 to A1
or
Range("D12:F15")=Range("A3:C6").value
to copy a range of cells at once.
Skopweb
09-13-2009, 11:52 AM
well
the need here is that i want to allow only paste special values if from excel and paste special text from any other source
is it possible to help me with the entire script?
actually i have this sheet to distribute to a bunch of thick heads that only know to do ctrl+c and ctrl+v. they find complications on even doing a paste special
please help !!!!!!!!!!!!!!!!
p45cal
09-13-2009, 02:23 PM
A google produced:
http://www.vbaexpress.com/kb/getarticle.php?kb_id=373
http://www.mrexcel.com/forum/showthread.php?t=84495
http://www.jkp-ads.com/articles/catchpaste.asp
http://www.mrexcel.com/forum/showthread.php?t=40428
http://www.xcelfiles.com/VBA_Quick13.html
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.