#1   Report Post  
Junior Member
 
Posts: 1
Default Paste Value

I have a spreadsheet that is used to collect information, ie, a form with data entry fields. I lock all the fields that should not change, and protect the worksheet. I have data validation for numeric fields as "whole number, greater than or equal to 0". However, if the user pastes a green background with .8 thick lines, it will paste numeric only data, but mess up the color and border formatting. The only thing the user can do is "Select locked cells" or "Select unlocked cells". The Select locked cells is checked because I use the "Comments" as mouse-over pop-up instructions.

This works great except that I can't stop people from pasting into the fields that are not locked. I would be fine if they pasted/value only. Does anyone know a way in VB to ensure that ALL pastes to a worksheet automatically and only use Paste/Value feature?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 587
Default Paste Value

hi pepps,

the only solution i see is to apply the format known to cells that undergo a change.
this is possible via the event:
Private Sub Worksheet_Change (ByVal Target As Range)

--
isabelle



Le 2012-06-08 18:02, pepps a écrit :
I have a spreadsheet that is used to collect information, ie, a form
with data entry fields. I lock all the fields that should not change,
and protect the worksheet. I have data validation for numeric fields as
"whole number, greater than or equal to 0". However, if the user pastes
a green background with .8 thick lines, it will paste numeric only data,
but mess up the color and border formatting. The only thing the user
can do is "Select locked cells" or "Select unlocked cells". The Select
locked cells is checked because I use the "Comments" as mouse-over
pop-up instructions.

This works great except that I can't stop people from pasting into the
fields that are not locked. I would be fine if they pasted/value only.
Does anyone know a way in VB to ensure that ALL pastes to a worksheet
automatically and only use Paste/Value feature?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste and Paste Special No Longer Working - Excel 2003 SheriJ Excel Discussion (Misc queries) 2 January 15th 09 09:23 PM
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. stan-the-man Excel Worksheet Functions 7 June 14th 06 08:10 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
How do I capture user paste action and convert to Paste Special DonC Excel Programming 0 November 19th 04 01:43 PM
Macro to Paste to specific line, and continue to Paste each time on next row not over tomkarakowski[_2_] Excel Programming 1 May 28th 04 06:50 PM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"