Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 774
- Office Version
- 365
- 2019
- Platform
- Windows
Good day,
I know absolutely this works in a "Private Sub". I had to move it to a Module for there are moving parts by the time I need to have these certain cells Populated. The error I'm getting is in "Me.Columns" portion of the macro.
The code is:
I know absolutely this works in a "Private Sub". I had to move it to a Module for there are moving parts by the time I need to have these certain cells Populated. The error I'm getting is in "Me.Columns" portion of the macro.
The code is:
VBA Code:
Sub Input_Cops()
With Excel.Application
If Not .Intersect(Target, Me.Columns("B")) Is Nothing Then
Me.Columns("B").AutoFit
End If
If Not .Intersect(Target, Me.Columns("L")) Is Nothing Then
.EnableEvents = False
With Target
If .CountLarge = 1 Then
Select Case UCase(.Value)
Case "2300": .Offset(0, -2).Value = "1 COP"
Case "4600": .Offset(0, -2).Value = "2 COPS"
Case "6900": .Offset(0, -2).Value = "3 COPS"
Case "9200": .Offset(0, -2).Value = "4 COPS"
End Select
End If
End With
.EnableEvents = True
End If
End With
End Sub