Results 1 to 2 of 2

Thread: Run-time error '1004': Application-Defined or Object defined error.

  1. #1

    Run-time error '1004': Application-Defined or Object defined error.



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,

    I'm getting a Run-time error '1004': Application-Defined or Object defined error. When ever I click a cell. I have the following code

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Address = "$M$6" Then
    If Target.Value = "Length" Then
    Target.Font.ColorIndex = 15
    Target.Value = ""
    Exit Sub
    End If
    End If

    If [M6].Value = "" Then
    [M6].Value = "Length"
    [M6].Font.ColorIndex = 15
    Else
    [M6].Font.ColorIndex = xlAutomatic
    End If
    End Sub

    Is there a way I can attach my worksheet for review?

  2. #2
    In case it helps anyone my problem was sheet protection wasn't allowing the cells to be formatted...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •