Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
What would be the appropriate code to restrict the user from using pasting
format. In other words, whenever a user uses Ctrl+V only the values are pasted. Thanx in advance. -- Best Regards, FARAZ A. QURESHI |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use Application.OnKey to assign one of your macro's to the shortcut
combination Ctrl-V. Remember to set it back afterwards, or even if the user deactivates the workbook (since this can be annoying). -- Wigi http://www.wimgielis.be = Excel/VBA, soccer and music "FARAZ QURESHI" wrote: What would be the appropriate code to restrict the user from using pasting format. In other words, whenever a user uses Ctrl+V only the values are pasted. Thanx in advance. -- Best Regards, FARAZ A. QURESHI |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there one for copy/paste?
"Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) 'retain formatting when a cell is copied over Dim myValue With Application .EnableEvents = False myValue = Target.Value .Undo Target = myValue .EnableEvents = True .CutCopyMode = False End With End Sub Note: works only with with copy/paste, not cut/paste Gord Dibben MS Excel MVP On Sun, 20 Jul 2008 23:38:00 -0700, FARAZ QURESHI wrote: What would be the appropriate code to restrict the user from using pasting format. In other words, whenever a user uses Ctrl+V only the values are pasted. Thanx in advance. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think you mean cut/paste.
No. I don't have code for that. Gord On Sun, 7 Sep 2008 20:33:01 -0700, aggiemullins wrote: Is there one for copy/paste? "Gord Dibben" wrote: Private Sub Worksheet_Change(ByVal Target As Range) 'retain formatting when a cell is copied over Dim myValue With Application .EnableEvents = False myValue = Target.Value .Undo Target = myValue .EnableEvents = True .CutCopyMode = False End With End Sub Note: works only with with copy/paste, not cut/paste Gord Dibben MS Excel MVP On Sun, 20 Jul 2008 23:38:00 -0700, FARAZ QURESHI wrote: What would be the appropriate code to restrict the user from using pasting format. In other words, whenever a user uses Ctrl+V only the values are pasted. Thanx in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Restrict users from changing to certain values in a cell | Excel Discussion (Misc queries) | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
can you change the default paste method? (paste values) | Excel Discussion (Misc queries) | |||
RESTRICT PASTE | Excel Worksheet Functions | |||
How do I restrict data movement (cut & paste) to only one column? | Excel Discussion (Misc queries) |