I tried the your attached file, it run very smooth on my PC, nothing is wrong.
I modify the code to avoid the event enabler and disabler, don't know if this could help on your PC.
I also add the Zoom feature to the code :
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Test 1.75
End Sub
Private Sub Test(ZoomIn As Single)
Dim cell As Range, a, i As Long, p As Long, s As String, isGreen As Boolean
On Error Resume Next
ActiveSheet.Pictures("ZoomCell").Delete
On Error GoTo 0
a = Selection.Value
For Each cell In Selection
With cell
If Len(.Value) Then
s = Replace$(.Value, ".", "#") & "#"
.Value = Left$(s, Len(s) - 1)
p = 1
isGreen = True
For i = 1 To Len(s)
If Mid$(s, i, 1) = "#" Then
.Characters(p, i - p).Font.Color = IIf(isGreen, 65280, 255)
p = i
isGreen = Not isGreen
End If
Next i
End If
End With
Next cell
With Selection
.CopyPicture Appearance:=xlScreen, Format:=xlPicture
With .Parent.Pictures.Paste
.Name = "ZoomCell"
.Top = Selection.Offset(, 1).Top
.Left = Selection.Offset(, 1).Left
.Width = .Width * ZoomIn
.Height = .Height * ZoomIn
.Select
End With
.Value = a
.Font.Color = 0
End With
End Sub
Bookmarks