Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello -
I was wondering if there is a way in an Excel macro where I can catch the paste event to make sure the user only copies/pastes the values of a field and not the format? I have some conditional formatting and if the user copies a certain cell, things get screwed up. Is there also a way to block a cut/paste? I tried relative formatting but for some reason things get screwed up when I run a macro that creates the relative formatting: With lTPSheet.Range("B" & lSelection.Row & ":E" & lSelection.Row) .FormatConditions.Delete .FormatConditions.Add Type:=xlExpression, Formula1:="=$D" & lSelection.Row & "=""X""" .FormatConditions(1).Font.ColorIndex = 2 .FormatConditions(1).Interior.ColorIndex = 3 End With The Formula1:="=$D" & lSelection.Row & "=""X""" does NOT set the correct row for some reason (usually off by 3) if it is a relative reference rather than absolute ($). Very strange unless I'm really missing something ... Thanks! Joe |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can you change the default paste method? (paste values) | Excel Discussion (Misc queries) | |||
How do I force values in a cell in excel? | Excel Discussion (Misc queries) | |||
Force values-only when pasting text to keep formatting | Excel Discussion (Misc queries) | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming | |||
How to force a recalculation of values based on custom function | Excel Programming |