Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following block of code strips away any formatting from copied text
before it is pasted. Private Sub Worksheet_Change(ByVal Target As Range) Application.ScreenUpdating = False Dim Temp As Variant Temp = Target.Formula On Error GoTo endit With Application .EnableEvents = False .Undo Target.Formula = Temp .EnableEvents = True End With endit: Application.EnableEvents = True Application.ScreenUpdating = True End Sub I would like to ensure that any extra spaces in the copied text is also removed before the text is pasted. Can someone show me how to incorporate the Trim function in the code above. Thanks, Bob |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function =Trim() | Excel Worksheet Functions | |||
Trim Function | Excel Programming | |||
TRIM function | Excel Worksheet Functions | |||
Trim Function | Excel Discussion (Misc queries) | |||
Trim Function | Excel Worksheet Functions |