Formats
Ahhh OK now I understand, it works with copy and paste, great!!
I was just wondering if it was possible to make it with just draging.
JPG
"Gord Dibben" wrote:
Paste SpecialValues would do the trick as others have mentioned.
If you don't want to take the extra couple of mouse-clicks you can use event
code behind the sheet.
Copy and paste only........
Private Sub Worksheet_Change(ByVal Target As Range)
'retain formatting when a cell is pasted over
On Error GoTo endit
Dim myValue
With Application
.EnableEvents = False
myValue = Target.Value
.Undo
Target = myValue
End With
endit:
Application.EnableEvents = True
End Sub
Right-click on the sheet tab and "View Code"
Copy/paste the above into that sheet module.
Gord Dibben MS Excel MVP
On Mon, 10 Dec 2007 12:28:03 -0800, juanpablo
wrote:
Is it possible to block all formats, so every time I modified the value
inside the cell, it does not change the format.
For example, if I copy a cell with borders, but I want to only copy de value
and not the format, but using the mouse, not using the CTRL+C or CTRL+V
So I want to be able to replace the contents only using the mouse, and not
the paste special function, keeping the formats.
JPG
|