Help find a way for Macro

%3CLINGO-SUB%20id%3D%22lingo-sub-2269129%22%20slang%3D%22en-US%22%3EHelp%20find%20a%20way%20for%20Macro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2269129%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20security%20reason%20our%20company%20blocked%20some%20macro%20phrases.%20I%20can't%20use%20it%20after%20restart%20the%20file.%3C%2FP%3E%3CP%3Eare%20there%20any%20other%20ways%20that%20I%20can%20use%20similar%20phrase%3F%3C%2FP%3E%3CP%3EThe%20phrases%20that%20I%20am%20using%20is%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPrivate%20Sub%20Worksheet_Change(ByVal%20Target%20As%20Range)%3CBR%20%2F%3EDim%20T%20As%20String%3CBR%20%2F%3EDim%20rngArea%20As%20Range%3CBR%20%2F%3E%3CBR%20%2F%3EWith%20Target%3CBR%20%2F%3EIf%20.Address%20%3D%20%22%24C%242%22%20Then%3CBR%20%2F%3EIf%20.Count%20%26gt%3B%201%20Then%20Exit%20Sub%3CBR%20%2F%3ESet%20rngArea%20%3D%20Me.Range(%22C5%22).CurrentRegion%3CBR%20%2F%3ET%20%3D%20.Value%3CBR%20%2F%3EIf%20IsEmpty(Target)%20Then%3CBR%20%2F%3EIf%20Me.FilterMode%20%3D%20True%20Then%3CBR%20%2F%3EMe.ShowAllData%3A%20rngArea.AutoFilter%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3EElse%3CBR%20%2F%3ErngArea.Columns(2).AutoFilter%201%2C%20%22%3D*%22%20%26amp%3B%20T%20%26amp%3B%20%22*%22%2C%20%2C%20%2C%200%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3E.Select%3CBR%20%2F%3EEnd%20If%3CBR%20%2F%3EEnd%20With%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2269129%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hi, 

For security reason our company blocked some macro phrases. I can't use it after restart the file.

are there any other ways that I can use similar phrase?

The phrases that I am using is below.

 

Private Sub Worksheet_Change(ByVal Target As Range)
Dim T As String
Dim rngArea As Range

With Target
If .Address = "$C$2" Then
If .Count > 1 Then Exit Sub
Set rngArea = Me.Range("C5").CurrentRegion
T = .Value
If IsEmpty(Target) Then
If Me.FilterMode = True Then
Me.ShowAllData: rngArea.AutoFilter
End If
Else
rngArea.Columns(2).AutoFilter 1, "=*" & T & "*", , , 0
End If
.Select
End If
End With
End Sub

 

 

 

1 Reply
Could you please share the core issue,, that what problem did you find with this VBA code,, any error,, and if your company admin has blocked the code then possibly protected by PW,, and admin could help only !!