I get the
Run-Time error 91: Object Variable or With block variable not set
when I open my program from a cloud storage location, and it opens with the warning question " "enable contents". When I click Enable the error 91 appears. If I open from my computer there is not problem. I do need to be able to download and open from the cloud storage location. My code is below.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
With ActiveSheet
.Cells.Interior.ColorIndex = xlNone
If Target.Rows.Count = 1 Then
Range("A" & Target.Row, "J" & Target.Row).Interior.ColorIndex = 27
End If
End With
End Sub