Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
MACRO PROBLEM - allowing only paste special
I was advised to use the following code for allowing the user to paste only
values instead of changing the entire cell format by Ctrl+V or Enter The code went well, or rather great, but after a couple of date I have found a problem that it doesn't allow me to "Find & Replace" showing error 1004 Upon Debug line 7, i.e. UNDO line, is highlighted 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 End With Application.CutCopyMode = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste Special Problem | Excel Discussion (Misc queries) | |||
Search, Copy, Paste Macro in Excel | Excel Worksheet Functions | |||
macro saving problem | Excel Worksheet Functions | |||
macro problem | Excel Worksheet Functions | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions |