I need to use excel with the xls extension, but some macros don't work that work on xlsm.
Private Sub Worksheet_Change(ByVal Target As Range) Dim objCell As Range If Target.Row = 1 Then Exit Sub If Not Application.Intersect(Range("A:I"), Target) Is Nothing Then Application.EnableEvents = False For Each objCell In Target With objCell If Len(.Value) > 0 Then Select Case .Column Case 1, 2 If TypeName(.Value) = "String" Then .Value = Left(.Value, 10) Else .Value = "" End If Case 4, 5 If .Value <> 0 And .Value <> 1 Then .Value = "" Case 6, 7 .Value = Replace(.Value, ";", "") Case 8, 9 If Not IsNumeric(.Value) Then .ClearContents End Select End If End With Next objCell Application.EnableEvents = True End If End Sub A macro like this in xls does nothing. The xlsm works.
Question: how can i use macros in xls?